This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] DWARF support for AIX v3


On 09/21/2015 08:41 AM, David Edelsohn wrote:
> +#ifndef XCOFF_DEBUGGING_INFO
>    if (DWARF_INITIAL_LENGTH_SIZE - DWARF_OFFSET_SIZE == 4)
>      dw2_asm_output_data (4, 0xffffffff,
>        "Initial length escape value indicating 64-bit DWARF extension");
>    dw2_asm_output_data (DWARF_OFFSET_SIZE,
>                        next_die_offset - DWARF_INITIAL_LENGTH_SIZE,
>                        "Length of Compilation Unit Info");
> +#endif

This should have a comment akin to the note in the introduction to your
message.  Otherwise someone's going to look at this in a few years and scratch
their head.


> @@ -10398,11 +10411,13 @@ output_line_info (bool prologue_only)
>    ASM_GENERATE_INTERNAL_LABEL (p1, LN_PROLOG_AS_LABEL, 0);
>    ASM_GENERATE_INTERNAL_LABEL (p2, LN_PROLOG_END_LABEL, 0);
> 
> +#ifndef XCOFF_DEBUGGING_INFO
>    if (DWARF_INITIAL_LENGTH_SIZE - DWARF_OFFSET_SIZE == 4)
>      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.


> +#ifndef XCOFF_DEBUGGING_INFO
>    /* 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.


> +#ifndef XCOFF_DEBUGGING_INFO
>    /* Have to end the macro section.  */
>    if (have_macinfo)
>      {
> @@ -25526,6 +25542,7 @@ dwarf2out_finish (const char *filename)
>        output_macinfo ();
>        dw2_asm_output_data (1, 0, "End compilation unit");
>      }
> +#endif

Similarly.

For this, the easy way to remove the macinfo is to force debug_info_level <
DINFO_LEVEL_VERBOSE, since the addition of the macinfo table is the only change
for -g3.


r~


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