summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2011-05-20 22:07:17 +0000
committerGreg Clayton <gclayton@apple.com>2011-05-20 22:07:17 +0000
commit43479731c00919b86b194a4e158437e968f588a9 (patch)
treec441bb6c149f45f14f2a224240fdd50979c7e44c
parent6282a4a1d37ab8a530fcbb729d7c446246ae32fe (diff)
downloadbcm5719-llvm-43479731c00919b86b194a4e158437e968f588a9.tar.gz
bcm5719-llvm-43479731c00919b86b194a4e158437e968f588a9.zip
Now that we have dynamic values, we need to protect the GetChildAtIndex()
calls with the target API mutex. llvm-svn: 131762
-rw-r--r--lldb/source/API/SBValue.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lldb/source/API/SBValue.cpp b/lldb/source/API/SBValue.cpp
index 4ed2c7d1ffe..03ac1273b73 100644
--- a/lldb/source/API/SBValue.cpp
+++ b/lldb/source/API/SBValue.cpp
@@ -348,6 +348,9 @@ SBValue::GetChildAtIndex (uint32_t idx, lldb::DynamicValueType use_dynamic)
{
lldb::ValueObjectSP child_sp;
+ if (m_opaque_sp->GetUpdatePoint().GetTarget())
+ Mutex::Locker api_locker (m_opaque_sp->GetUpdatePoint().GetTarget()->GetAPIMutex());
+
if (m_opaque_sp)
{
child_sp = m_opaque_sp->GetChildAtIndex (idx, true);
@@ -401,6 +404,10 @@ SBValue::GetChildMemberWithName (const char *name, lldb::DynamicValueType use_dy
lldb::ValueObjectSP child_sp;
const ConstString str_name (name);
+ if (m_opaque_sp->GetUpdatePoint().GetTarget())
+ Mutex::Locker api_locker (m_opaque_sp->GetUpdatePoint().GetTarget()->GetAPIMutex());
+
+
if (m_opaque_sp)
{
child_sp = m_opaque_sp->GetChildMemberWithName (str_name, true);
OpenPOWER on IntegriCloud