diff options
| author | Jason Molenda <jmolenda@apple.com> | 2010-11-09 01:21:22 +0000 |
|---|---|---|
| committer | Jason Molenda <jmolenda@apple.com> | 2010-11-09 01:21:22 +0000 |
| commit | 45b49245502eda6ab774b3d6ecd9398d86d17717 (patch) | |
| tree | 06f0fcfe786b8434bd56c83e7b396e47390180b0 | |
| parent | 478382521e966efd996194cbbce0088fbcf4db5c (diff) | |
| download | bcm5719-llvm-45b49245502eda6ab774b3d6ecd9398d86d17717.tar.gz bcm5719-llvm-45b49245502eda6ab774b3d6ecd9398d86d17717.zip | |
Fix thinko in UnwindTable.cpp where it wouldn't provde a
FuncUnwinders object if the eh_frame section was missing
from an objfile. Worked fine on x86_64 but on i386 where
eh_frame is unusual, that resulted in the arch default
UnwindPlan being used all the time instead of picking up
an assembly profile based unwindplan.
llvm-svn: 118467
| -rw-r--r-- | lldb/include/lldb/Symbol/FuncUnwinders.h | 2 | ||||
| -rw-r--r-- | lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp | 11 | ||||
| -rw-r--r-- | lldb/source/Plugins/Process/Utility/UnwindLLDB.h | 1 | ||||
| -rw-r--r-- | lldb/source/Symbol/UnwindTable.cpp | 7 |
4 files changed, 11 insertions, 10 deletions
diff --git a/lldb/include/lldb/Symbol/FuncUnwinders.h b/lldb/include/lldb/Symbol/FuncUnwinders.h index ea4e100858c..472927c1f9a 100644 --- a/lldb/include/lldb/Symbol/FuncUnwinders.h +++ b/lldb/include/lldb/Symbol/FuncUnwinders.h @@ -61,8 +61,8 @@ public: return m_range.ContainsFileAddress (addr); } -protected: +private: UnwindTable& m_unwind_table; UnwindAssemblyProfiler *m_assembly_profiler; AddressRange m_range; diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp index dcfb1343297..9b02b466f5b 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp @@ -764,9 +764,14 @@ RegisterContextLLDB::SavedLocationForRegister (uint32_t lldb_regnum, RegisterLoc { if (log) { - log->Printf("%*sFrame %d could not convert lldb regnum %d into %d RegisterKind reg numbering scheme", - m_frame_number < 100 ? m_frame_number : 100, "", m_frame_number, - lldb_regnum, (int) unwindplan_registerkind); + if (unwindplan_registerkind == eRegisterKindGeneric) + log->Printf("%*sFrame %d could not convert lldb regnum %d into eRegisterKindGeneric reg numbering scheme", + m_frame_number < 100 ? m_frame_number : 100, "", m_frame_number, + lldb_regnum); + else + log->Printf("%*sFrame %d could not convert lldb regnum %d into %d RegisterKind reg numbering scheme", + m_frame_number < 100 ? m_frame_number : 100, "", m_frame_number, + lldb_regnum, (int) unwindplan_registerkind); } return false; } diff --git a/lldb/source/Plugins/Process/Utility/UnwindLLDB.h b/lldb/source/Plugins/Process/Utility/UnwindLLDB.h index 128a4a7d20f..1741a125f95 100644 --- a/lldb/source/Plugins/Process/Utility/UnwindLLDB.h +++ b/lldb/source/Plugins/Process/Utility/UnwindLLDB.h @@ -56,6 +56,7 @@ private: lldb::RegisterContextSP reg_ctx; // These are all RegisterContextLLDB's Cursor () : start_pc (LLDB_INVALID_ADDRESS), cfa (LLDB_INVALID_ADDRESS), sctx(), reg_ctx() { } + private: DISALLOW_COPY_AND_ASSIGN (Cursor); }; diff --git a/lldb/source/Symbol/UnwindTable.cpp b/lldb/source/Symbol/UnwindTable.cpp index 7738cba83f6..5356e9493e4 100644 --- a/lldb/source/Symbol/UnwindTable.cpp +++ b/lldb/source/Symbol/UnwindTable.cpp @@ -77,11 +77,6 @@ UnwindTable::GetFuncUnwindersContainingAddress (const Address& addr, SymbolConte initialize(); - if (m_eh_frame == NULL) - { - return no_unwind_found; - } - // Create a FuncUnwinders object for the binary search below AddressRange search_range(addr, 1); FuncUnwindersSP search_unwind(new FuncUnwinders (*this, NULL, search_range)); @@ -111,7 +106,7 @@ UnwindTable::GetFuncUnwindersContainingAddress (const Address& addr, SymbolConte if (!sc.GetAddressRange(eSymbolContextFunction | eSymbolContextSymbol, range) || !range.GetBaseAddress().IsValid()) { // Does the eh_frame unwind info has a function bounds for this addr? - if (!m_eh_frame->GetAddressRange (addr, range)) + if (m_eh_frame == NULL || !m_eh_frame->GetAddressRange (addr, range)) { return no_unwind_found; } |

