forked from OSchip/llvm-project
Correctly create the register contexts in RegisterContextThreadMemory.
llvm-svn: 180908
This commit is contained in:
parent
a18dfe6b96
commit
bca31a3d64
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue