This is the mail archive of the
mailing list for the binutils project.
Re: [Patch]: support of find_nearest_line on rs6000-aix using dwarf
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Tristan Gingold <gingold at adacore dot com>
- Cc: binutils Development <binutils at sourceware dot org>
- Date: Wed, 28 Sep 2011 18:35:10 +0100
- Subject: Re: [Patch]: support of find_nearest_line on rs6000-aix using dwarf
- References: <A45578CF-0197-4512-9C36-4AF9615DDE2C@adacore.com>
Tristan Gingold <firstname.lastname@example.org> 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 ?
> 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
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.