I created the attached patch with git format-patch; I've never used that before, so I'm hoping I got it right. :-) Please let me know if there's anything else you need/want for approval. -- Caroline cmtice@google.com gdb/ChangeLog: 2020-07-01 Caroline Tice * dwarf2/read.c (struct dwop_section_names): Add rnglists_dwo. (dwop_section_names): Add .debug_rnglists.dwo, .zdebug_rnglists.dwo. (struct dwarf2_cu): Add cu_ranges_from_skeleton field. (struct dwo_sections): Add rnglists field. (dwarf2_ranges_read): Add tag parameter. (cu_debug_rnglist_section): New function (decl & definition). (cutu_reader::cutu_reader): Before replacing the skeleton unit comp_unit_die with the dwo comp_unit_die, check to see if the skeleton unit die has a DW_AT_ranges, and if so set the cu_ranges_from_skeleton field in the cu. (dwarf2_locate_dwo_sections): Add code to read rnglists_dwo section. (dwarf2_rnglists_process): Add a dwarf_tag parameter, for the kind of die whose range is being checked; add code to read the rnglist section from the dwo file rather than from the main objfile, if appropriate. Add cases for DW_RLE_base_addressx, DW_RLE_startx_length, DW_RLE_startx_endx. Also, update to only add the base address to DW_RLE_offset_pairs (not to all ranges). (dwarf2_ranges_process): Add dwarf tag parameter and pass it to dwarf2_rnglists_process. (dwarf2_ranges_read): Add dwarf tag parameter and pass it to dwarf2_ranges_process. (dwarf2_get_pc_bounds): Check for DW_FORM_rnglistx when setting need_ranges_base. Also pass die tag to dwarf2_ranges_read. (dwarf2_record_block_ranges): Check for DW_FORM_rnglistx when setting need_ranges_base. Also pass die tag to dwarf2_ranges_read. (read_full_die_1): Add code to read DW_AT_rnglists_base and assign to cu->ranges_base. (partial_die_info::read): Check for DW_FORM_rnglistx when setting need_ranges_base. Also pass die tag to dwarf2_ranges_read. (read_rnglist_index): New function. (read_attribute_reprocess): Add code for DW_FORM_rnglistx. (read_attribute_value): Mark DW_FORM_rnglistx with need_reprocess. gdb/testsuite/ChangeLog entry: 2020-07-01 Caroline Tice * gdb.dwarf2/dw5-rnglist-test.cc: New file. * gdb.dwarf2/dw5-rnglist-test.exp: New file. On Tue, Jun 30, 2020 at 5:36 PM Simon Marchi wrote: > > On 2020-06-30 8:34 p.m., Simon Marchi wrote: > > On 2020-06-23 3:04 p.m., Caroline Tice via Gdb-patches wrote: > >> I believe I have addressed all of your comments. The updated patch is > >> attached. Please let me know if this is ok now. Thanks! > > > > Hi Caroline, > > > > Just to be sure, could you please send the complete patch, including the commit message (using > > either git-format-patch or git-send-email)? It would be nice to see the patch as it will be > > merged, which includes the commit message. > > > > Simon > > > > Oh, and just a nit, git told me this when applying: > > /home/simark/patches/gdb-dwo-rnglists.updated2.patch:188: space before tab in indent. > default: > warning: 1 line adds whitespace errors. > > Simon