Fix bug reported and analyzed by Olivier Crete:
authorJim Blandy <jimb@codesourcery.com>
Wed, 8 Sep 2004 21:58:19 +0000 (21:58 +0000)
committerJim Blandy <jimb@codesourcery.com>
Wed, 8 Sep 2004 21:58:19 +0000 (21:58 +0000)
commit7b90c3f96efc132cac934b3f2b43da899d46eae0
treec956505ed511fa6e4ec307ae552a7492570a7351
parent10b016c223f165a06dbd20e46307c9a0bfbf0ee2
Fix bug reported and analyzed by Olivier Crete:
* symfile.c (copy_section_addr_info): New function.
(symbol_file_add_with_addrs_or_offsets): Use it to save the
original set of address arguments, instead of handwritten code
that uses one length to allocate and a different length to
initialize.  Use make_cleanup_free_section_addr_info.
* symfile.h (copy_section_addr_info): New declaration.
* utils.c: #include "symfile.h".
(do_free_section_addr_info, make_cleanup_free_section_addr_info):
New functions.
* defs.h (make_cleanup_free_section_addr_info): New declaration.
* Makefile.in (utils.o): Update dependencies.
gdb/ChangeLog
gdb/Makefile.in
gdb/defs.h
gdb/symfile.c
gdb/symfile.h
gdb/utils.c