This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch]: support of find_nearest_line on rs6000-aix using dwarf


On Sep 28, 2011, at 7:35 PM, Richard Sandiford wrote:

> Tristan Gingold <gingold@adacore.com> writes:
>> this patch adds support of dwarf in find_nearest_line for rs6000-aix.
>> It would have been trivial (and already supported) if AIX didn't use non-standard names for dwarf sections.
>> 
>> This patch adds an argument to _bfd_dwarf2_find_nearest_line containing the names of the dwarf sections.  The remaining is adjustments.
>> 
>> Manually tested on aix,
>> no regressions for powerpc-elf,
>> bfd rebuilt with --enable-all-targets.
>> 
>> Ok for trunk ?
>> 
>> Tristan.
>> 
>> PS: I haven't found any better approach.  The use of non-standard
>> names has an impact in gdb, find_nearest_line and objdump.  I haven't
>> yet made dump of dwarf sections in objdump working.  If someone has a
>> good idea (for the long term ?), please give it!
> 
> ISTR you were originally going to rename the sections to the standard
> ones at read time, is that right?  FWIW, I like the new approach much
> better.  But yeah, it's going to painful teaching everything about the
> nonstandard names...
> 
> The patch looks good to me.  I wondered whether it would be better to
> put the dwarf sections in the backend data, but I suppose passing it as
> an argument is more flexible.  Some formats might end up needing two
> sets of names -- one for the standard set and one for compatibility --
> and putting a fixed set of names in the backend data wouldn't allow that.
> 
>> @@ -2723,12 +2732,11 @@ comp_unit_hash_info (struct dwarf2_debug *stash,
>>    describing the contents appended onto the name.  This allows the linker to
>>    identify and discard duplicate debugging sections for different
>>    compilation units.  */
>> -#define DWARF2_DEBUG_INFO ".debug_info"
>> -#define DWARF2_COMPRESSED_DEBUG_INFO ".zdebug_info"
>> #define GNU_LINKONCE_INFO ".gnu.linkonce.wi."
>> 
>> static asection *
>> -find_debug_info (bfd *abfd, asection *after_sec)
>> +find_debug_info (bfd *abfd, const struct dwarf_debug_section *debug_sections,
>> +                 asection *after_sec)
> 
> You should adjust the function comment to mention DEBUG_SECTIONS.
> 
> Patch is OK with that change if noone objects in 24 hours.

Now committed with the suggested change.

Tristan.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]