Now that we have dynamic values, we need to protect the GetChildAtIndex()

calls with the target API mutex.

llvm-svn: 131762
This commit is contained in:
Greg Clayton
2011-05-20 22:07:17 +00:00
parent 6282a4a1d3
commit 43479731c0

View File

@@ -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);