[patch] Fix separate-debug with non-unique section names (PR 11409)

Mark Kettenis mark.kettenis@xs4all.nl
Wed Mar 24 19:23:00 GMT 2010


> From: Tom Tromey <tromey@redhat.com>
> Date: Wed, 24 Mar 2010 13:02:07 -0600
> 
> >>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
> 
> Jan> gdb-7.1 is now broken for example for debugging /usr/bin/emacs due to:
> Jan> http://sourceware.org/bugzilla/show_bug.cgi?id=11409
> Jan>   [22] .data   PROGBITS 00000000007fe8a0 1fe8a0 215068 00  WA  0   0 32
> Jan>   [23] .data   PROGBITS 0000000000a13920 413920 68c6e0 00  WA  0   0 32
> 
> Jan> 2010-03-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
> Jan> 	* symfile.c (addr_info_make_relative): Move sect declaration to the
> Jan> 	outer block.  Initialize it to NULL.  Prefer SECT->next more than
> Jan> 	bfd_get_section_by_name.
> 
> This patch seems to assume that all sections of the same name will be
> next to each other in the section_addr_info.  Why is it ok to make this
> assumption?

That assumption is false, at least in general.  I have an
OpenBSD/mips64el emacs binary that has two .data sections that aren't
adjacent.



More information about the Gdb-patches mailing list