diff options
author | Greg Clayton <gclayton@apple.com> | 2013-05-02 04:15:24 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2013-05-02 04:15:24 +0000 |
commit | bca31a3d6422ec68373d5222bedd917fa1bc79b3 (patch) | |
tree | db3488bd848f06f8c4d0362b09f5f45141bdd7f5 | |
parent | a18dfe6b96af2d2e9ac95c306b711fa6a504b6cc (diff) | |
download | bcm5719-llvm-bca31a3d6422ec68373d5222bedd917fa1bc79b3.tar.gz bcm5719-llvm-bca31a3d6422ec68373d5222bedd917fa1bc79b3.zip |
Correctly create the register contexts in RegisterContextThreadMemory.
llvm-svn: 180908
-rw-r--r-- | lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp index 1cef63d1e22..98bbc8b8038 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp @@ -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); - else + ThreadSP backing_thread_sp (thread_sp->GetBackingThread()); + if (backing_thread_sp) { - - ThreadSP backing_thread_sp (thread_sp->GetBackingThread()); - if (backing_thread_sp) - m_reg_ctx_sp = backing_thread_sp->GetRegisterContext(); + m_reg_ctx_sp = backing_thread_sp->GetRegisterContext(); } + else + { + OperatingSystem *os = process_sp->GetOperatingSystem (); + if (os->IsOperatingSystemPluginThread (thread_sp)) + m_reg_ctx_sp = os->CreateRegisterContextForThread (thread_sp.get(), LLDB_INVALID_ADDRESS); + } } } } |