summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Utility/ThreadMemory.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-01-08 21:56:43 +0000
committerGreg Clayton <gclayton@apple.com>2013-01-08 21:56:43 +0000
commitb65d733f0684d331c0ceed8e2261892b45ae108b (patch)
treead315800c73c2bf071f23f2abdf72b0668bdbacc /lldb/source/Plugins/Process/Utility/ThreadMemory.cpp
parente55c9f9cfb330d7343495123fd6cc6d535f8805c (diff)
downloadbcm5719-llvm-b65d733f0684d331c0ceed8e2261892b45ae108b.tar.gz
bcm5719-llvm-b65d733f0684d331c0ceed8e2261892b45ae108b.zip
<rdar://problem/12586010>
Python OS plug-ins now fetch thread registers lazily. Also changed SBCommandInterpreter::HandleCommand() to not take the API lock. The logic here is that from the command line you can execute a command that might result in another thread (like the private process thread) to execute python or run any code that can re-enter the public API. When this happens, a deadlock immediately occurs for things like "process launch" and "process attach". llvm-svn: 171901
Diffstat (limited to 'lldb/source/Plugins/Process/Utility/ThreadMemory.cpp')
-rw-r--r--lldb/source/Plugins/Process/Utility/ThreadMemory.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/Utility/ThreadMemory.cpp b/lldb/source/Plugins/Process/Utility/ThreadMemory.cpp
index 6afa01d49b4..7ab5db73fcd 100644
--- a/lldb/source/Plugins/Process/Utility/ThreadMemory.cpp
+++ b/lldb/source/Plugins/Process/Utility/ThreadMemory.cpp
@@ -135,7 +135,10 @@ ThreadMemory::GetPrivateStopReason ()
void
ThreadMemory::RefreshStateAfterStop()
{
- RegisterContextSP reg_ctx_sp(GetRegisterContext());
+ // Don't fetch the registers by calling Thread::GetRegisterContext() below.
+ // We might not have fetched any registers yet and we don't want to fetch
+ // the registers just to call invalidate on them...
+ RegisterContextSP reg_ctx_sp(m_reg_context_sp);
if (reg_ctx_sp)
{
const bool force = true;
OpenPOWER on IntegriCloud