summaryrefslogtreecommitdiffstats
path: root/lldb/source/Symbol/DWARFCallFrameInfo.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2016-06-07 02:19:54 +0000
committerJason Molenda <jmolenda@apple.com>2016-06-07 02:19:54 +0000
commitc7afda5a0942a0fe3bd814d1f6a308e1dd817053 (patch)
treef42260f41dc26eaa0732aa4a7639dbe3c4486abe /lldb/source/Symbol/DWARFCallFrameInfo.cpp
parent6fd589a763a3c819ec09efd5ff0899cbe6bb59af (diff)
downloadbcm5719-llvm-c7afda5a0942a0fe3bd814d1f6a308e1dd817053.tar.gz
bcm5719-llvm-c7afda5a0942a0fe3bd814d1f6a308e1dd817053.zip
Add support for using armv7 compact unwind information
as an asynchronous unwind plan source. Two small fixes to the compact unwind dumper tool for armv7 encodings. A change to DWARFCallFrameInfo to strip the 0th bit on addresses in eh_frame sections when armv7. In the clang generated examples I have, the 0th bit is set for thumb functions and that's causing the unwinder to pick the wrong function for eh_frame info. llvm-svn: 271970
Diffstat (limited to 'lldb/source/Symbol/DWARFCallFrameInfo.cpp')
-rw-r--r--lldb/source/Symbol/DWARFCallFrameInfo.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lldb/source/Symbol/DWARFCallFrameInfo.cpp b/lldb/source/Symbol/DWARFCallFrameInfo.cpp
index a3194307323..671fe0020ee 100644
--- a/lldb/source/Symbol/DWARFCallFrameInfo.cpp
+++ b/lldb/source/Symbol/DWARFCallFrameInfo.cpp
@@ -316,6 +316,14 @@ DWARFCallFrameInfo::GetFDEIndex ()
Timer scoped_timer (__PRETTY_FUNCTION__, "%s - %s", __PRETTY_FUNCTION__, m_objfile.GetFileSpec().GetFilename().AsCString(""));
+ bool clear_address_zeroth_bit = false;
+ ArchSpec arch;
+ if (m_objfile.GetArchitecture (arch))
+ {
+ if (arch.GetTriple().getArch() == llvm::Triple::arm || arch.GetTriple().getArch() == llvm::Triple::thumb)
+ clear_address_zeroth_bit = true;
+ }
+
lldb::offset_t offset = 0;
if (m_cfi_data_initialized == false)
GetCFIData();
@@ -376,6 +384,9 @@ DWARFCallFrameInfo::GetFDEIndex ()
const lldb::addr_t data_addr = LLDB_INVALID_ADDRESS;
lldb::addr_t addr = m_cfi_data.GetGNUEHPointer(&offset, cie->ptr_encoding, pc_rel_addr, text_addr, data_addr);
+ if (clear_address_zeroth_bit)
+ addr &= ~1ull;
+
lldb::addr_t length = m_cfi_data.GetGNUEHPointer(&offset, cie->ptr_encoding & DW_EH_PE_MASK_ENCODING, pc_rel_addr, text_addr, data_addr);
FDEEntryMap::Entry fde (addr, length, current_entry);
m_fde_index.Append(fde);
OpenPOWER on IntegriCloud