diff options
author | Jim Ingham <jingham@apple.com> | 2011-10-21 01:49:48 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2011-10-21 01:49:48 +0000 |
commit | 8f077161391865d46b05a9a50dffa0eedc3d6deb (patch) | |
tree | e75063aec8603ee1cc69815c7f30f1325ad2aa42 /lldb/source/Plugins/Process/Utility | |
parent | 001153784a3a16ecdefbe4e5c462bc5649b1ed92 (diff) | |
download | bcm5719-llvm-8f077161391865d46b05a9a50dffa0eedc3d6deb.tar.gz bcm5719-llvm-8f077161391865d46b05a9a50dffa0eedc3d6deb.zip |
Lock the Unwinder before accessing it.
llvm-svn: 142632
Diffstat (limited to 'lldb/source/Plugins/Process/Utility')
4 files changed, 16 insertions, 18 deletions
diff --git a/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp b/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp index 4ed69e85387..d61b6d07c23 100644 --- a/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp +++ b/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp @@ -30,7 +30,7 @@ UnwindLLDB::UnwindLLDB (Thread &thread) : } uint32_t -UnwindLLDB::GetFrameCount() +UnwindLLDB::DoGetFrameCount() { if (m_frames.empty()) { @@ -177,7 +177,7 @@ UnwindLLDB::AddOneMoreFrame (ABI *abi) } bool -UnwindLLDB::GetFrameInfoAtIndex (uint32_t idx, addr_t& cfa, addr_t& pc) +UnwindLLDB::DoGetFrameInfoAtIndex (uint32_t idx, addr_t& cfa, addr_t& pc) { if (m_frames.size() == 0) { @@ -200,7 +200,7 @@ UnwindLLDB::GetFrameInfoAtIndex (uint32_t idx, addr_t& cfa, addr_t& pc) } lldb::RegisterContextSP -UnwindLLDB::CreateRegisterContextForFrame (StackFrame *frame) +UnwindLLDB::DoCreateRegisterContextForFrame (StackFrame *frame) { lldb::RegisterContextSP reg_ctx_sp; uint32_t idx = frame->GetConcreteFrameIndex (); diff --git a/lldb/source/Plugins/Process/Utility/UnwindLLDB.h b/lldb/source/Plugins/Process/Utility/UnwindLLDB.h index 9625e2e5427..dfd488d8f9c 100644 --- a/lldb/source/Plugins/Process/Utility/UnwindLLDB.h +++ b/lldb/source/Plugins/Process/Utility/UnwindLLDB.h @@ -30,22 +30,23 @@ public: virtual ~UnwindLLDB() { } +protected: void - Clear() + DoClear() { m_frames.clear(); } virtual uint32_t - GetFrameCount(); + DoGetFrameCount(); bool - GetFrameInfoAtIndex (uint32_t frame_idx, + DoGetFrameInfoAtIndex (uint32_t frame_idx, lldb::addr_t& cfa, lldb::addr_t& start_pc); lldb::RegisterContextSP - CreateRegisterContextForFrame (lldb_private::StackFrame *frame); + DoCreateRegisterContextForFrame (lldb_private::StackFrame *frame); private: struct Cursor diff --git a/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp b/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp index d09f93b635d..5706c6d2381 100644 --- a/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp +++ b/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp @@ -28,7 +28,7 @@ UnwindMacOSXFrameBackchain::UnwindMacOSXFrameBackchain (Thread &thread) : } uint32_t -UnwindMacOSXFrameBackchain::GetFrameCount() +UnwindMacOSXFrameBackchain::DoGetFrameCount() { if (m_cursors.empty()) { @@ -45,7 +45,7 @@ UnwindMacOSXFrameBackchain::GetFrameCount() } bool -UnwindMacOSXFrameBackchain::GetFrameInfoAtIndex (uint32_t idx, addr_t& cfa, addr_t& pc) +UnwindMacOSXFrameBackchain::DoGetFrameInfoAtIndex (uint32_t idx, addr_t& cfa, addr_t& pc) { const uint32_t frame_count = GetFrameCount(); if (idx < frame_count) @@ -64,7 +64,7 @@ UnwindMacOSXFrameBackchain::GetFrameInfoAtIndex (uint32_t idx, addr_t& cfa, addr } lldb::RegisterContextSP -UnwindMacOSXFrameBackchain::CreateRegisterContextForFrame (StackFrame *frame) +UnwindMacOSXFrameBackchain::DoCreateRegisterContextForFrame (StackFrame *frame) { lldb::RegisterContextSP reg_ctx_sp; uint32_t concrete_idx = frame->GetConcreteFrameIndex (); diff --git a/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.h b/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.h index 6a48f5dfd70..5667aaf7462 100644 --- a/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.h +++ b/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.h @@ -30,27 +30,24 @@ public: { } +protected: virtual void - Clear() + DoClear() { m_cursors.clear(); } virtual uint32_t - GetFrameCount(); + DoGetFrameCount(); bool - GetFrameInfoAtIndex (uint32_t frame_idx, + DoGetFrameInfoAtIndex (uint32_t frame_idx, lldb::addr_t& cfa, lldb::addr_t& pc); lldb::RegisterContextSP - CreateRegisterContextForFrame (lldb_private::StackFrame *frame); - - lldb_private::Thread & - GetThread(); + DoCreateRegisterContextForFrame (lldb_private::StackFrame *frame); -protected: friend class RegisterContextMacOSXFrameBackchain; struct Cursor |