summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2019-02-18 11:06:57 +0000
committerPavel Labath <pavel@labath.sk>2019-02-18 11:06:57 +0000
commitd1304bba343f8c318e879e29dc29bb5e5039c874 (patch)
tree0619267cbe0fd17ef3e1c14673d98c57d1d70c50 /lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
parent9d723b8296d7524544fe7829439226217bf50698 (diff)
downloadbcm5719-llvm-d1304bba343f8c318e879e29dc29bb5e5039c874.tar.gz
bcm5719-llvm-d1304bba343f8c318e879e29dc29bb5e5039c874.zip
PECOFF: Implement GetBaseAddress
COFF files are modelled in lldb as having one big container section spanning the entire module image, with the actual sections being subsections of that. In this model, the base address is simply the address of the first byte of that section. This also removes the hack where ObjectFilePECOFF was using the m_file_offset field to communicate this information. Using file offset for this purpose is completely wrong, as that is supposed to indicate where is this ObjectFile located in the file on disk. This field is only meaningful for fat binaries, and should normally be 0. Both PDB plugins have been updated to use GetBaseAddress instead of GetFileOffset. llvm-svn: 354258
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp')
-rw-r--r--lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
index 2c079c3a2ca..84b9e7f86b3 100644
--- a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
+++ b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
@@ -181,7 +181,7 @@ uint32_t SymbolFilePDB::CalculateAbilities() {
}
void SymbolFilePDB::InitializeObject() {
- lldb::addr_t obj_load_address = m_obj_file->GetFileOffset();
+ lldb::addr_t obj_load_address = m_obj_file->GetBaseAddress().GetFileAddress();
lldbassert(obj_load_address && obj_load_address != LLDB_INVALID_ADDRESS);
m_session_up->setLoadAddress(obj_load_address);
if (!m_global_scope_up)
OpenPOWER on IntegriCloud