[Lldb-commits] [lldb] aa786b8 - [lldb] [PECOFF] Only use PECallFrameInfo on the one supported architecture

Martin Storsjö via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 1 02:39:58 PDT 2020


Author: Martin Storsjö
Date: 2020-04-01T12:39:21+03:00
New Revision: aa786b881fc89a2a9883bff77912f2053126f95b

URL: https://github.com/llvm/llvm-project/commit/aa786b881fc89a2a9883bff77912f2053126f95b
DIFF: https://github.com/llvm/llvm-project/commit/aa786b881fc89a2a9883bff77912f2053126f95b.diff

LOG: [lldb] [PECOFF] Only use PECallFrameInfo on the one supported architecture

The RuntimeFunction struct, which PECallFrameInfo interprets, has a
different layout and differnet semantics on all architectures.

Differential Revision: https://reviews.llvm.org/D77000

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
index 38b4472f50a7..385b291df709 100644
--- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
+++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
@@ -782,6 +782,9 @@ std::unique_ptr<CallFrameInfo> ObjectFilePECOFF::CreateCallFrameInfo() {
   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);
 }


        


More information about the lldb-commits mailing list