[Lldb-commits] [PATCH] D58050: PECOFF: Implement GetBaseAddress

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 11 05:24:25 PST 2019


labath created this revision.
labath added reviewers: amccarth, zturner, stella.stamenova, asmith.
labath added a project: LLDB.

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.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D58050

Files:
  lit/Modules/PECOFF/basic-info.yaml
  source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
  source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
  source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
  source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58050.186236.patch
Type: text/x-patch
Size: 5054 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190211/32aa8b1c/attachment.bin>


More information about the lldb-commits mailing list