diff options
| author | Greg Clayton <gclayton@apple.com> | 2013-01-08 21:56:43 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2013-01-08 21:56:43 +0000 |
| commit | b65d733f0684d331c0ceed8e2261892b45ae108b (patch) | |
| tree | ad315800c73c2bf071f23f2abdf72b0668bdbacc | |
| parent | e55c9f9cfb330d7343495123fd6cc6d535f8805c (diff) | |
| download | bcm5719-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
| -rw-r--r-- | lldb/source/API/SBCommandInterpreter.cpp | 4 | ||||
| -rw-r--r-- | lldb/source/Plugins/Process/Utility/ThreadMemory.cpp | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/lldb/source/API/SBCommandInterpreter.cpp b/lldb/source/API/SBCommandInterpreter.cpp index ac387331917..61a9739aa53 100644 --- a/lldb/source/API/SBCommandInterpreter.cpp +++ b/lldb/source/API/SBCommandInterpreter.cpp @@ -119,10 +119,6 @@ SBCommandInterpreter::HandleCommand (const char *command_line, SBCommandReturnOb result.Clear(); if (command_line && m_opaque_ptr) { - TargetSP target_sp(m_opaque_ptr->GetDebugger().GetSelectedTarget()); - Mutex::Locker api_locker; - if (target_sp) - api_locker.Lock(target_sp->GetAPIMutex()); m_opaque_ptr->HandleCommand (command_line, add_to_history ? eLazyBoolYes : eLazyBoolNo, result.ref()); } else 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; |

