[PATCH 2/3] gas: Make dwarf2dbg.c versions specific and add DW_AT_high_pc case for DWARF 4+.
Mon Apr 30 10:08:00 GMT 2012
On Apr 28, 2012, at 12:21 AM, Mark Wielaard wrote:
> 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.
This looks good to me. I haven't tested it but I will adjust it in case of issues.
> 2012-04-26 Mark Wielaard <email@example.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.
More information about the Binutils