llvm-project/lldb/source
Martin Storsjö 7d019d1a3b [LLDB] Set the right address size on output DataExtractors from ObjectFile
If filling in a DataExtractor from an ObjectFile, e.g. via the
ReadSectionData method, the output DataExtractor gets the address
size from the m_data member.

ObjectFile's m_data member is initialized without knowledge about
the address size (so the address size is set based on the host's
sizeof(void*), and at that point within ObjectFile's constructor,
virtual methods implemented in subclasses (like GetAddressByteSize())
can't be called, therefore fix it up when filling in external
DataExtractors.

This makes sure that line tables from executables with a different
address size are parsed properly; previously this tripped up
DWARFDebugLine::LineTable::parse for 32 bit executables on a 64 bit
host, as the address size in the line table (4) didn't match the
one set in the DWARFDataExtractor.

Differential Revision: https://reviews.llvm.org/D70848
2019-12-02 22:42:00 +02:00
..
API [lldb] Remove FileSpec->CompileUnit inheritance 2019-11-29 11:44:45 +01:00
Breakpoint [lldb][NFC] Use raw_ostream instead of Stream in Baton::GetDescription 2019-12-02 13:27:21 +01:00
Commands [lldb][NFC] Use raw_ostream instead of Stream in Baton::GetDescription 2019-12-02 13:27:21 +01:00
Core [lldb] Remove FileSpec->CompileUnit inheritance 2019-11-29 11:44:45 +01:00
DataFormatters Simplify condition (NFC) 2019-10-01 17:08:38 +00:00
Expression [lldb] remove unsigned Stream::operator<< overloads 2019-11-26 14:24:28 +01:00
Host [-gmodules] Let LLDB log a warning if the Clang module hash mismatches. 2019-11-15 11:52:13 -08:00
Initialization [Reproducer] Use ::rtrim() to remove trailing control characters. 2019-10-18 17:11:48 +00:00
Interpreter [lldb][NFC] Give some parameters in CommandInterpreter more descriptive names 2019-11-05 09:21:10 +01:00
Plugins [lldb][NFC] Don't calculate member indices in DWARFASTParserClang::ParseChildMembers 2019-12-02 14:43:40 +01:00
Symbol [LLDB] Set the right address size on output DataExtractors from ObjectFile 2019-12-02 22:42:00 +02:00
Target [lldb][NFC] Make Stream's IndentLevel an unsigned integers. 2019-12-02 13:01:26 +01:00
Utility [lldb][NFC] Use raw_ostream instead of Stream in Baton::GetDescription 2019-12-02 13:27:21 +01:00
CMakeLists.txt [CMake] Remove Apple-specific version logic. 2019-04-17 18:23:22 +00:00
lldb.cpp [CMake] Remove Apple-specific version logic. 2019-04-17 18:23:22 +00:00