@ikudrin has correctly noticed modifying a copy of DWARFDataExtractor makes no sense. Removed it as it currently has no effect. In fact one caller needs it as otherwise it assumes .debug_rnglists width from ELF width which in practice works but it is not correct. All callers of DWARFListTableHeader::extract:
- llvm/unittests/DebugInfo/DWARF/DWARFListTableTest.cpp - not using address parsing
- llvm/lib/DebugInfo/DWARF/DWARFContext.cpp dumpLoclistsSection - it uses: Data.setAddressSize(Header.getAddrSize());
- lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp SetLoclistsBase - it sets m_loclist_table_header which is never used for parsing addresses
- lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp ParseListTableHeader - called only by GetRnglistTable
Callers of GetRnglistTable:
- lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp GetRnglistOffset - not used for parsing addresses
- lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp FindRnglistFromOffset - calling findList which does not set the address size. So this part needed a fix in this patch.
clang-tidy: error: 'Plugins/SymbolFile/DWARF/DWARFUnit.h' file not found [clang-diagnostic-error]
not useful