summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2013-04-04 02:23:41 +0000
committerJim Ingham <jingham@apple.com>2013-04-04 02:23:41 +0000
commitfce1dad04210b9ea0a2271c02592bac12444cb27 (patch)
treed981c01ff3e8557639d722e142898bad1eac7be9
parent86c0d06194f055a7c12505302bebb904240dfeed (diff)
downloadbcm5719-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.cpp6
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))
OpenPOWER on IntegriCloud