summaryrefslogtreecommitdiff
path: root/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.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
commit64853971a6861e8bb7d08f567255687f826b7152 (patch)
tree0d22d965e20eea7ba92ec13a7f0e8e60b12687f9 /source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
parent7264ac35687588a1180b46703fb606b4ce526917 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@354258 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp')
-rw-r--r--source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp b/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
index 004609f59..6939f34b4 100644
--- a/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
+++ b/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
@@ -315,7 +315,7 @@ uint32_t SymbolFileNativePDB::CalculateAbilities() {
}
void SymbolFileNativePDB::InitializeObject() {
- m_obj_load_address = m_obj_file->GetFileOffset();
+ m_obj_load_address = m_obj_file->GetBaseAddress().GetFileAddress();
m_index->SetLoadAddress(m_obj_load_address);
m_index->ParseSectionContribs();