[PATCH] DWARF support for AIX v3

David Edelsohn dje.gcc@gmail.com
Tue Sep 22 18:09:00 GMT 2015

On Tue, Sep 22, 2015 at 11:29 AM, Richard Henderson <rth@redhat.com> wrote:

>> @@ -10398,11 +10411,13 @@ output_line_info (bool prologue_only)
>>      dw2_asm_output_data (4, 0xffffffff,
>>        "Initial length escape value indicating 64-bit DWARF extension");
>>    dw2_asm_output_delta (DWARF_OFFSET_SIZE, l2, l1,
>>                         "Length of Source Line Info");
>> +#endif
> ... or perhaps since we keep repeating the pattern, pull this out to a
> subroutine like output_initial_size, or something.  We probably should have
> done that before, when we added dwarf4 support.

I agree that encapsulating it would be nice, but not all of the DWARF
sections compute the length as a single value, e.g., the delta
computation using labels above.  If I change this, I need to direct
the dw2 output of different length computations into a string, or
duplicate the logic for the various forms of computation.  That starts
to make the cure worse than the disease.

>>    /* Output location list section if necessary.  */
>>    if (have_location_lists)
>>      {
>> @@ -25494,6 +25510,7 @@ dwarf2out_finish (const char *filename)
>>        ASM_OUTPUT_LABEL (asm_out_file, loc_section_label);
>>        output_location_lists (comp_unit_die ());
>>      }
>> +#endif
> I'd think you need to disable add_AT_loc_list instead.  Otherwise it would
> appear as if we would still add the the location_description attribute to the
> DIE, but then not fill in the referent.
> Frankly I think there is going to be a *lot* that breaks, or is unusable,
> without support for location lists.

Yep.  Shrug.  I'm just the messenger.

I'm re-working the parts of the patch based on your suggestion.

Thanks, David

More information about the Gcc-patches mailing list