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
lldb/source/Plugins/Process/Utility

View File

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