From 63cd24fec9c4000dfc5f902924b4d97f0a0a1978 Mon Sep 17 00:00:00 2001 From: Elena Zannoni Date: Thu, 11 Sep 2003 19:20:07 +0000 Subject: [PATCH] 2003-09-11 Elena Zannoni * symfile.c (symbol_file_add_with_addrs_or_offsets): Make sure orig_addrs is set up properly. --- gdb/ChangeLog | 5 +++++ gdb/symfile.c | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1e729ea60ed..56898d19b99 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2003-09-11 Elena Zannoni + + * symfile.c (symbol_file_add_with_addrs_or_offsets): Make sure + orig_addrs is set up properly. + 2003-09-11 Andrew Cagney * gdbarch.sh (DEPRECATED_STACK_ALIGN): Rename STACK_ALIGN. 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. */ -- 2.30.2