mstorsjo created this revision. mstorsjo added reviewers: labath, rnk, aleksandr.urakov. Herald added subscribers: danielkiss, kristof.beyls. Herald added a project: LLDB.
Not sure how easy it is to make a sensible test for this; it makes a difference when the aarch64 RuntimeFunction struct, when interpreted as an x86_64 RuntimeFunction, happens to falsely match address ranges that the unwinder looks for... Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D77000 Files: lldb/source/Plugins/ObjectFile/PECOFF/PECallFrameInfo.cpp Index: lldb/source/Plugins/ObjectFile/PECOFF/PECallFrameInfo.cpp =================================================================== --- lldb/source/Plugins/ObjectFile/PECOFF/PECallFrameInfo.cpp +++ lldb/source/Plugins/ObjectFile/PECOFF/PECallFrameInfo.cpp @@ -4,6 +4,7 @@ #include "Plugins/Process/Utility/lldb-x86-register-enums.h" #include "lldb/Symbol/UnwindPlan.h" +#include "lldb/Utility/ArchSpec.h" #include "llvm/Support/Win64EH.h" using namespace lldb; @@ -437,9 +438,11 @@ PECallFrameInfo::PECallFrameInfo(ObjectFilePECOFF &object_file, uint32_t exception_dir_rva, uint32_t exception_dir_size) - : m_object_file(object_file), - m_exception_dir(object_file.ReadImageDataByRVA(exception_dir_rva, - exception_dir_size)) {} + : m_object_file(object_file) { + if (m_object_file.GetArchitecture().GetMachine() == llvm::Triple::x86_64) + m_exception_dir = object_file.ReadImageDataByRVA(exception_dir_rva, + exception_dir_size); +} bool PECallFrameInfo::GetAddressRange(Address addr, AddressRange &range) { range.Clear();
Index: lldb/source/Plugins/ObjectFile/PECOFF/PECallFrameInfo.cpp =================================================================== --- lldb/source/Plugins/ObjectFile/PECOFF/PECallFrameInfo.cpp +++ lldb/source/Plugins/ObjectFile/PECOFF/PECallFrameInfo.cpp @@ -4,6 +4,7 @@ #include "Plugins/Process/Utility/lldb-x86-register-enums.h" #include "lldb/Symbol/UnwindPlan.h" +#include "lldb/Utility/ArchSpec.h" #include "llvm/Support/Win64EH.h" using namespace lldb; @@ -437,9 +438,11 @@ PECallFrameInfo::PECallFrameInfo(ObjectFilePECOFF &object_file, uint32_t exception_dir_rva, uint32_t exception_dir_size) - : m_object_file(object_file), - m_exception_dir(object_file.ReadImageDataByRVA(exception_dir_rva, - exception_dir_size)) {} + : m_object_file(object_file) { + if (m_object_file.GetArchitecture().GetMachine() == llvm::Triple::x86_64) + m_exception_dir = object_file.ReadImageDataByRVA(exception_dir_rva, + exception_dir_size); +} bool PECallFrameInfo::GetAddressRange(Address addr, AddressRange &range) { range.Clear();
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits