diff options
author | Ed Maste <emaste@FreeBSD.org> | 2016-01-04 01:16:32 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2016-01-04 01:16:32 +0000 |
commit | 9f2f44ceeb195c67fbbf0953f03c530f6f1e59d4 (patch) | |
tree | 1a3cc0a2c3d432ddf9ffc14f06bd43e8097fc93c /contrib/llvm/tools/lldb/source/Symbol/UnwindTable.cpp | |
parent | 0a97e59728ecf251d065745cb716ffe32b24aa28 (diff) | |
parent | 3bd2e91faeb9eeec1aae82c64a3253afff551cfd (diff) |
Merge LLDB 3.8
As with previous imports a number of plugins not immediately relevant
to FreeBSD have been excluded:
ABIMacOSX_i386
ABIMacOSX_arm
ABIMacOSX_arm64
ABISysV_hexagon
AppleObjCRuntimeV2
AppleObjCRuntimeV1
SystemRuntimeMacOSX
RenderScriptRuntime
GoLanguageRuntime
GoLanguage
ObjCLanguage
ObjCPlusPlusLanguage
ObjectFilePECOFF
DynamicLoaderWindowsDYLD
platform_linux
platform_netbsd
PlatformWindows
PlatformKalimba
platform_android
DynamicLoaderMacOSXDYLD
ObjectContainerUniversalMachO
PlatformRemoteiOS
PlatformMacOSX
OperatingSystemGo
Notes
Notes:
svn path=/projects/clang380-import/; revision=293127
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Symbol/UnwindTable.cpp')
-rw-r--r-- | contrib/llvm/tools/lldb/source/Symbol/UnwindTable.cpp | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/contrib/llvm/tools/lldb/source/Symbol/UnwindTable.cpp b/contrib/llvm/tools/lldb/source/Symbol/UnwindTable.cpp index 90b33a69a789..ac7a9b0fda87 100644 --- a/contrib/llvm/tools/lldb/source/Symbol/UnwindTable.cpp +++ b/contrib/llvm/tools/lldb/source/Symbol/UnwindTable.cpp @@ -17,6 +17,7 @@ #include "lldb/Symbol/FuncUnwinders.h" #include "lldb/Symbol/SymbolContext.h" #include "lldb/Symbol/DWARFCallFrameInfo.h" +#include "lldb/Symbol/ArmUnwindInfo.h" #include "lldb/Symbol/CompactUnwindInfo.h" // There is one UnwindTable object per ObjectFile. @@ -31,8 +32,9 @@ UnwindTable::UnwindTable (ObjectFile& objfile) : m_unwinds (), m_initialized (false), m_mutex (), - m_eh_frame (nullptr), - m_compact_unwind (nullptr) + m_eh_frame_up (), + m_compact_unwind_up (), + m_arm_unwind_up () { } @@ -56,12 +58,21 @@ UnwindTable::Initialize () SectionSP sect = sl->FindSectionByType (eSectionTypeEHFrame, true); if (sect.get()) { - m_eh_frame = new DWARFCallFrameInfo(m_object_file, sect, eRegisterKindGCC, true); + m_eh_frame_up.reset(new DWARFCallFrameInfo(m_object_file, sect, eRegisterKindEHFrame, true)); } sect = sl->FindSectionByType (eSectionTypeCompactUnwind, true); if (sect.get()) { - m_compact_unwind = new CompactUnwindInfo(m_object_file, sect); + m_compact_unwind_up.reset(new CompactUnwindInfo(m_object_file, sect)); + } + sect = sl->FindSectionByType (eSectionTypeARMexidx, true); + if (sect.get()) + { + SectionSP sect_extab = sl->FindSectionByType (eSectionTypeARMextab, true); + if (sect_extab.get()) + { + m_arm_unwind_up.reset(new ArmUnwindInfo(m_object_file, sect, sect_extab)); + } } } @@ -70,8 +81,6 @@ UnwindTable::Initialize () UnwindTable::~UnwindTable () { - if (m_eh_frame) - delete m_eh_frame; } FuncUnwindersSP @@ -102,7 +111,7 @@ UnwindTable::GetFuncUnwindersContainingAddress (const Address& addr, SymbolConte if (!sc.GetAddressRange(eSymbolContextFunction | eSymbolContextSymbol, 0, false, range) || !range.GetBaseAddress().IsValid()) { // Does the eh_frame unwind info has a function bounds for this addr? - if (m_eh_frame == nullptr || !m_eh_frame->GetAddressRange (addr, range)) + if (m_eh_frame_up == nullptr || !m_eh_frame_up->GetAddressRange (addr, range)) { return no_unwind_found; } @@ -129,7 +138,7 @@ UnwindTable::GetUncachedFuncUnwindersContainingAddress (const Address& addr, Sym if (!sc.GetAddressRange(eSymbolContextFunction | eSymbolContextSymbol, 0, false, range) || !range.GetBaseAddress().IsValid()) { // Does the eh_frame unwind info has a function bounds for this addr? - if (m_eh_frame == nullptr || !m_eh_frame->GetAddressRange (addr, range)) + if (m_eh_frame_up == nullptr || !m_eh_frame_up->GetAddressRange (addr, range)) { return no_unwind_found; } @@ -158,14 +167,21 @@ DWARFCallFrameInfo * UnwindTable::GetEHFrameInfo () { Initialize(); - return m_eh_frame; + return m_eh_frame_up.get(); } CompactUnwindInfo * UnwindTable::GetCompactUnwindInfo () { Initialize(); - return m_compact_unwind; + return m_compact_unwind_up.get(); +} + +ArmUnwindInfo * +UnwindTable::GetArmUnwindInfo () +{ + Initialize(); + return m_arm_unwind_up.get(); } bool |