summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2020-03-29 01:33:55 +0200
committerTom Stellard <tstellar@redhat.com>2020-05-18 18:24:44 -0700
commitaba4e3fa3bd0aad13168f2f6e8f1874f9a0fdb57 (patch)
treeb7f08e4395ffa8eed741c021205903b7c5d5397c
parenteaae6dfc545000e335e6f89abb9c78818383d7ad (diff)
downloadbcm5719-llvm-aba4e3fa3bd0aad13168f2f6e8f1874f9a0fdb57.tar.gz
bcm5719-llvm-aba4e3fa3bd0aad13168f2f6e8f1874f9a0fdb57.zip
[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 (cherry picked from commit aa786b881fc89a2a9883bff77912f2053126f95b)
-rw-r--r--lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
index 2e62e3292b9..750bc77bdf7 100644
--- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
+++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
@@ -780,6 +780,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);
}
OpenPOWER on IntegriCloud