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] Fix -gdwarf-5 -gsplit-dwarf ICEs (PR debug/89498)


On 3/4/19 5:35 PM, Jakub Jelinek wrote:
Hi!

output_view_list_offset does:
   if (dwarf_split_debug_info)
     dw2_asm_output_delta (DWARF_OFFSET_SIZE, sym, loc_section_label,
                           "%s", dwarf_attr_name (a->dw_attr));
   else
     dw2_asm_output_offset (DWARF_OFFSET_SIZE, sym, debug_loc_section,
                            "%s", dwarf_attr_name (a->dw_attr));
while output_loc_list_offset does:
   if (!dwarf_split_debug_info)
     dw2_asm_output_offset (DWARF_OFFSET_SIZE, sym, debug_loc_section,
                            "%s", dwarf_attr_name (a->dw_attr));
   else if (dwarf_version >= 5)
     {
       gcc_assert (AT_loc_list (a)->num_assigned);
       dw2_asm_output_data_uleb128 (AT_loc_list (a)->hash, "%s (%s)",
                                    dwarf_attr_name (a->dw_attr),
                                    sym);
     }
   else
     dw2_asm_output_delta (DWARF_OFFSET_SIZE, sym, loc_section_label,
                           "%s", dwarf_attr_name (a->dw_attr));
but both size_of_die and value_format handle both the same as loc_list,
so for -gdwarf-5 -gsplit-dwarf we just ICE, as e.g. AT_loc_list is not
valid on a view list.

Assuming output_view_list_offset is correct, the following patch adjusts
size_of_die/value_format accordingly.

I would guess that omitting the handling from output_view_list_offset was an oversight in the view work. Alex, which is right? :)

Jason


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