[PATCH 2/3] gas: Make dwarf2dbg.c versions specific and add DW_AT_high_pc case for DWARF 4+.

Mark Wielaard mjw@redhat.com
Sat Apr 28 09:45:00 GMT 2012


On Fri, 2012-04-27 at 16:39 +0200, Tristan Gingold wrote:
> On Apr 27, 2012, at 4:32 PM, Mark Wielaard wrote:
> 
> > On Fri, 2012-04-27 at 14:28 +0200, Tristan Gingold wrote:
> >>> +/* The .debug_aranges version has been 2 in DWARF version 2, 3 and 4. */
> >>> +#define DWARF2_ARANGES_VERSION 2
> >>> +
> >>> +/* This implementation output version 2 .debug_line information. */
> >>> +#define DWARF2_LINE_VERSION 2
> >> 
> >> Please, wrap DWARF2_LINE_VERSION within #ifndef/#endif, so that a
> >> target can override it.  In particular on ia64/VMS, the backtrace
> >> symbolizer requires version 3.
> > 
> > OK can do. Do you know which version it wants set to 3?
> > info, aranges or line?
> 
> Just line.

OK, would the following version of the patch work for you?
The only change to the variant that jakub approved is the addition of
#ifndef and the override in config/tc-ia64.h.

2012-04-26  Mark Wielaard  <mjw@redhat.com>

    * dwarf2dbg.c (DWARF2_ARANGES_VERSION): New define to 2.
    (DWARF2_LINE_VERSION): Likewise.
    (out_debug_line): Use DWARF2_LINE_VERSION not DWARF2_VERSION.
    (out_debug_aranges): Use DWARF2_ARANGES_VERSION not DWARF2_VERSION.
    (out_debug_abbrev): Use DW_FORM_data for DW_AT_high_pc when
    DWARF2_VERSION >= 4.
    (out_debug_info): Use difference between start and end as data
    value for DW_AT_high_pc when DWARF2_VERSION >= 4.
    * config/tc-ia64.h (DWARF2_LINE_VERSION): Override it.

Thanks,

Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: binutils-gas.patch
Type: text/x-patch
Size: 2328 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20120428/79334b6b/attachment.bin>


More information about the Binutils mailing list