summaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2003-09-11 19:20:07 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2003-09-11 19:20:07 +0000
commit63cd24fec9c4000dfc5f902924b4d97f0a0a1978 (patch)
treeac11e7b1728dbeb2fe54b83aad5e99027db673b0 /gdb/symfile.c
parent3fcf0ced0360da3cf3119f16c4e8cee60284b248 (diff)
downloadbinutils-gdb-63cd24fec9c4000dfc5f902924b4d97f0a0a1978.tar.gz
2003-09-11 Elena Zannoni <ezannoni@redhat.com>
* symfile.c (symbol_file_add_with_addrs_or_offsets): Make sure orig_addrs is set up properly.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index f9b78ce99c2..04c6b8892da 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -854,7 +854,12 @@ symbol_file_add_with_addrs_or_offsets (char *name, int from_tty,
orig_addrs = alloc_section_addr_info (bfd_count_sections (abfd));
my_cleanups = make_cleanup (xfree, orig_addrs);
if (addrs)
- *orig_addrs = *addrs;
+ {
+ int i;
+ orig_addrs->num_sections = addrs->num_sections;
+ for (i = 0; i < addrs->num_sections; i++)
+ orig_addrs->other[i] = addrs->other[i];
+ }
/* If the objfile uses a mapped symbol file, and we have a psymtab for
it, then skip reading any symbols at this time. */