On Mon, Jun 1, 2020 at 1:33 PM Tom Tromey wrote: > > >>>>> "Caroline" == Caroline Tice via Gdb-patches writes: > > Caroline> This patch fixes these issues. I verified that it fixes the > Caroline> issues I saw and that it does not cause any testsuite > Caroline> regressions (on x86_64 ubuntu linux). > > Is there a way to reproduce the failures with the current test suite? > Say, by running some test using some board file? I have not been able to reproduce it with the current testsuite. The issue is largely related to processing DW_FORM_rmglistx, which I have not been able to get GCC to produce (it generated a DW_FORM_sec_offset instead); I get my issue using llvm. I will attempt to attach a gzip'ed tarball (if gmail will let me) containing my small test case. It has 2 .cpp files, 1 .h file, the two clang-generated .dwo files, and the final binary. The command I used to compile the sources, and obtain the .dwo & binary files is: $ clang++ -gdwarf-5 -O0 -gsplit-dwarf pre-order.cpp pre-order-common.cpp -o pre-order To see the first of the issues, you need to enable complaints (change the value of "stop_whining" in complaints.c to something like 10). When you do that, rebuild gdb, and load the binary into gdb, it immediately complains: $ ~/fsf-gdb.clean.obj/gdb/gdb pre-order ... Reading symbols from pre-order... During symbol reading: Invalid .debug_rnglists data (no base address) During symbol reading: Invalid .debug_rnglists data (no base address) (gdb) quit This is because of the incorrect reading of the DW_FORM_rnglistx index. GDB then ignores the rnglists altogether because it can't read them. > > Caroline> @@ -793,12 +796,18 @@ struct virtual_v2_dwo_sections > Caroline> bfd_size_type loc_offset; > Caroline> bfd_size_type loc_size; > > Caroline> + bfd_size_type loclists_offset; > Caroline> + bfd_size_type loclists_size; > Caroline> + > Caroline> bfd_size_type macinfo_offset; > Caroline> bfd_size_type macinfo_size; > > Caroline> bfd_size_type macro_offset; > Caroline> bfd_size_type macro_size; > > Caroline> + bfd_size_type rnglists_offset; > Caroline> + bfd_size_type rnglists_size; > > These new members don't seem to be used anywhere. Oh. Those get used in my next upcoming patch (where I update GDB to handle DWARFv5 .dwp files). I can either leave them in this patch, or remove them from here and put them in the next one, whichever you prefer. > > Caroline> +static struct dwarf2_section_info *cu_debug_rnglist_section (struct > Caroline> + dwarf2_cu *cu); > > Probably better to split before the "(" and then indent the continuation > line 2 spaces. > > Caroline> - default: > Caroline> + case DW_RLE_startx_endx: > > Looks like the indentation here is incorrect. > > Caroline> + > Caroline> + attr = die->attr (DW_AT_rnglists_base); > > Extra space after the "=". Thanks for the review! I will fix the formatting issues, and resubmit as soon as you indicate whether to leave in or take out the currently unused fields. -- Caroline > > Tom