This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] fix for separate debug info
- From: Elena Zannoni <ezannoni at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Thu, 14 Aug 2003 16:20:27 -0400
- Subject: Re: [PATCH] fix for separate debug info
- References: <16186.47455.21008.985967@localhost.redhat.com>
Elena Zannoni writes:
>
> Turns out that this patch:
> 2003-06-06 Mark Mitchell <mark@codesourcery.com>
>
> [...]
> * symfile.c [...]
> (symbol_file_add_with_addrs_or_offsets): Allocate orig_addrs
> dynamically.
> [...]
>
> broke the handling of separate debug info files.
>
> Here is a fix. Nobody had noticed this failure because you need the
> separate debug info for libraries, etc installed and because there is
> no test for this feature. I'll add one next.
>
>
> elena
>
committed to gdb-6 and mainline
elena
>
> 2003-08-13 Elena Zannoni <ezannoni@redhat.com>
>
> * symfile.c (symbol_file_add_with_addrs_or_offsets): Make sure
> orig_addrs is set up properly.
>
> Index: symfile.c
> ===================================================================
> RCS file: /cvs/uberbaum/gdb/symfile.c,v
> retrieving revision 1.101
> diff -u -p -r1.101 symfile.c
> --- symfile.c 27 Jun 2003 13:11:17 -0000 1.101
> +++ symfile.c 13 Aug 2003 22:08:27 -0000
> @@ -854,7 +854,12 @@ symbol_file_add_with_addrs_or_offsets (c
> 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. */