diff options
author | Jim Ingham <jingham@apple.com> | 2012-08-22 21:34:33 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2012-08-22 21:34:33 +0000 |
commit | 4fc6cb9c7685552842f39159146be23ffead16c5 (patch) | |
tree | bc93d4d6358c57a5ff6e49b7a47717fb39fd71be /lldb/source/Target/Thread.cpp | |
parent | 1e4f425d2f0df8e79ad198d593ac7e620173938b (diff) | |
download | bcm5719-llvm-4fc6cb9c7685552842f39159146be23ffead16c5.tar.gz bcm5719-llvm-4fc6cb9c7685552842f39159146be23ffead16c5.zip |
Rework how the API mutex is acquired when filling out an ExecutionContext from an ExecutionContextRef,
particularly in the SBThread & SBFrame interfaces. Instead of filling the whole context & then getting
the API mutex, we now get only the target, acquire the API mutex from it, then fill out the rest of the
context. This removes a race condition where you get a ThreadSP, then wait on the API mutex while another
command Destroy's the Thread you've just gotten.
Also fixed the ExecutionContextRef::Get*SP calls so they don't return invalid objects.
Also fixed the ExecutionContext::Has*Scope calls so they don't claim to have a scope if the object representing
that scope has been destroyed.
Also fixed a think-o in Thread::IsValid which was causing it to return the opposite of the desired value.
<rdar://problem/11995490>
llvm-svn: 162401
Diffstat (limited to 'lldb/source/Target/Thread.cpp')
-rw-r--r-- | lldb/source/Target/Thread.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp index df86869cc33..7ff006c6bce 100644 --- a/lldb/source/Target/Thread.cpp +++ b/lldb/source/Target/Thread.cpp @@ -708,7 +708,7 @@ Thread::PopPlan () { LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); - if (m_plan_stack.empty()) + if (m_plan_stack.size() <= 1) return; else { |