Correctly create the register contexts in RegisterContextThreadMemory.

llvm-svn: 180908
This commit is contained in:
Greg Clayton 2013-05-02 04:15:24 +00:00
parent a18dfe6b96
commit bca31a3d64
1 changed files with 9 additions and 8 deletions

View File

@ -50,16 +50,17 @@ RegisterContextThreadMemory::UpdateRegisterContext ()
}
if (!m_reg_ctx_sp)
{
OperatingSystem *os = process_sp->GetOperatingSystem ();
if (os->IsOperatingSystemPluginThread (thread_sp))
m_reg_ctx_sp = os->CreateRegisterContextForThread (thread_sp.get(), LLDB_INVALID_ADDRESS);
ThreadSP backing_thread_sp (thread_sp->GetBackingThread());
if (backing_thread_sp)
{
m_reg_ctx_sp = backing_thread_sp->GetRegisterContext();
}
else
{
ThreadSP backing_thread_sp (thread_sp->GetBackingThread());
if (backing_thread_sp)
m_reg_ctx_sp = backing_thread_sp->GetRegisterContext();
}
OperatingSystem *os = process_sp->GetOperatingSystem ();
if (os->IsOperatingSystemPluginThread (thread_sp))
m_reg_ctx_sp = os->CreateRegisterContextForThread (thread_sp.get(), LLDB_INVALID_ADDRESS);
}
}
}
}