I've been playing with running the testsuite with -gdwarf-5 -gsplit-dwarf and using the clang compiler. I did not find any tests that showed the issues I was running into (but I did discover a small bug in my patch, which my newer patch fixes). With my fixed patch, there are no testsuite differences. I have created a new testsuite test case, which does fail with current ToT and passes with my patch, but that only works if you compile it with clang -- if you compile it with GCC it passes in both cases (because GCC is not generating the DW_FORM_rmglistx that my patch is handling/fixing). I've updated the patch to include the requested format changes, remove the pieces that are only used in an upcoming patch, fix the small issue I found while testing, and I've added the test to the testsuite. To run the test and see the issue: $ make check RUNTESTFLAGS="CC_FOR_TARGET=${CLANG_CC} CXX_FOR_TARGET=${CLANG_CXX} dw5-rnglist-test.exp" gdb/ChangeLog (updated) 2020-06-04 Caroline Tice * dwarf2/read.c (struct dwop_section_names): Add rnglists_dwo. (dwop_section_names): Add .debug_rnglists.dwo, .zdebug_rnglists.dwo. (struct dwo_sections): Add rnglists field. (cu_debug_rnglist_section): New function (decl & definition). (dwarf2_locate_dwo_sections): Add code to read rnglists_dwo section. (dwarf2_rnglists_process): 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_get_pc_bounds): Check for DW_FORM_rnglistx when setting need_ranges_base. (dwarf2_record_block_ranges): Check for DW_FORM_rnglistx when setting need_ranges_base. (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. (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: 2020-06-04 Caroline Tice * gdb.dwarf2/dw5-rnglist-test.cc: New file. * gdb.dwarf2/dw5-rnglist-test.exp: New file. On Wed, Jun 3, 2020 at 7:49 AM Tom Tromey wrote: > > Caroline> $ clang++ -gdwarf-5 -O0 -gsplit-dwarf pre-order.cpp > Caroline> pre-order-common.cpp -o pre-order > > I wonder if the test suite can be run this way. > > Caroline> Oh. Those get used in my next upcoming patch (where I update GDB to > Caroline> handle DWARFv5 .dwp files). I can either leave them in this patch, or > Caroline> remove them from here and put them in the next one, whichever you > Caroline> prefer. > > I think it's better for patches to be reasonably self-contained when > possible. > > Also, there were other patches for DWARFv5 on the list in "recent" (this > year) times. I wonder if those are relevant / related. > > Tom