diff options
author | Jim Ingham <jingham@apple.com> | 2013-04-04 02:23:41 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2013-04-04 02:23:41 +0000 |
commit | fce1dad04210b9ea0a2271c02592bac12444cb27 (patch) | |
tree | d981c01ff3e8557639d722e142898bad1eac7be9 | |
parent | 86c0d06194f055a7c12505302bebb904240dfeed (diff) | |
download | bcm5719-llvm-fce1dad04210b9ea0a2271c02592bac12444cb27.tar.gz bcm5719-llvm-fce1dad04210b9ea0a2271c02592bac12444cb27.zip |
The SBValue impl class's GetSP can now fetch the dynamic type or the synthetic
children - which it may have to compute. Thus it needs to take the API lock.
<rdar://problem/13560869>
llvm-svn: 178734
-rw-r--r-- | lldb/source/API/SBValue.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lldb/source/API/SBValue.cpp b/lldb/source/API/SBValue.cpp index 9ac0af00255..906fed18128 100644 --- a/lldb/source/API/SBValue.cpp +++ b/lldb/source/API/SBValue.cpp @@ -106,6 +106,12 @@ namespace { if (!m_opaque_sp) return m_opaque_sp; lldb::ValueObjectSP value_sp = m_opaque_sp; + + Mutex::Locker api_lock; + Target *target = value_sp->GetTargetSP().get(); + if (target) + api_lock.Lock(target->GetAPIMutex()); + if (value_sp->GetDynamicValue(m_use_dynamic)) value_sp = value_sp->GetDynamicValue(m_use_dynamic); if (value_sp->GetSyntheticValue(m_use_synthetic)) |