While experimenting with GDB on DWARF 5 with split debug (dwo files), I discovered that GDB was not reading the rnglist index properly (it needed to be reprocessed in the same way the loclist index does), and that there was no code for reading rnglists out of dwo files at all. Also, the rnglist address reading function (dwarf2_rnglists_process) was adding the base address to all rnglist entries, when it's only supposed to add it to the DW_RLE_offset_pair entries (http://dwarfstd.org/doc/DWARF5.pdf, p. 53), and was not handling several entry types. This patch fixes these issues. I verified that it fixes the issues I saw and that it does not cause any testsuite regressions (on x86_64 ubuntu linux). Is there anything else I need to do? Is this Ok to commit? -- Caroline Tice cmtice@google.com gdb/ChangeList: 2020-06-01 Caroline Tice * dwarf2/read.c (struct dwop_section_names): Add rnglists_dwo. (dwop_section_names): Add .debug_rnglists.dwo, .zdebug_rnglists.dwo. (struct dwo_sectionds): Add rnglists field. (struct virtual_v2_dwo_sections): Add loclists_offset, loclists_size, rnglists_offset, rnglists_size. (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). (read_full_die_1): Add code to read DW_AT_rnglists_base and assign to cu->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.