[Lldb-commits] [PATCH] D77000: [LLDB] [PECOFF] Only use PECallFrameInfo on the one supported architecture

Martin Storsjö via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 30 04:17:54 PDT 2020


mstorsjo updated this revision to Diff 253548.
mstorsjo retitled this revision from "[lldb] [PECOFF] Check that PECallFrameInfo operates on the expected architecture before interpreting RuntimeFunction structs" to "[LLDB] [PECOFF] Only use PECallFrameInfo on the one supported architecture".
mstorsjo edited the summary of this revision.
mstorsjo added a comment.

Moved the check up to ObjectFilePECOFF.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77000/new/

https://reviews.llvm.org/D77000

Files:
  lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp


Index: lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
===================================================================
--- lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
+++ lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
@@ -782,6 +782,9 @@
   if (!data_dir_exception.vmaddr)
     return {};
 
+  if (m_coff_header.machine != llvm::COFF::IMAGE_FILE_MACHINE_AMD64)
+    return {};
+
   return std::make_unique<PECallFrameInfo>(*this, data_dir_exception.vmaddr,
                                            data_dir_exception.vmsize);
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77000.253548.patch
Type: text/x-patch
Size: 574 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200330/9b520bf1/attachment-0001.bin>


More information about the lldb-commits mailing list