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