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
This commit is contained in:
Jim Ingham 2013-04-04 02:23:41 +00:00
parent 86c0d06194
commit fce1dad042
1 changed files with 6 additions and 0 deletions

View File

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