[Lldb-commits] [PATCH] D157059: [lldb][PECOFF] Exclude alignment padding when reading section data
Hiroshi Yamauchi via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 4 10:24:26 PDT 2023
hjyamauchi marked an inline comment as done.
hjyamauchi added inline comments.
================
Comment at: lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp:1035
+ // llvm::object::COFFObjectFile::getSectionSize().
+ if (m_binary->getDOSHeader())
+ return std::min(section->GetByteSize(), section->GetFileSize());
----------------
compnerd wrote:
> Can we use `m_binary->getPEHeader() || m_binary->getPE32Header()` here instead? We are technically ensuring that this is a linked (PE) binary rather than an object file. While a DOS header is present, it is not an absolute requirement (theoretically, it is practically never going to change).
Done.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157059/new/
https://reviews.llvm.org/D157059
More information about the lldb-commits
mailing list