[Lldb-commits] [lldb] r180908 - Correctly create the register contexts in RegisterContextThreadMemory.

Greg Clayton gclayton at apple.com
Wed May 1 21:15:24 PDT 2013


Author: gclayton
Date: Wed May  1 23:15:24 2013
New Revision: 180908

URL: http://llvm.org/viewvc/llvm-project?rev=180908&view=rev
Log:
Correctly create the register contexts in RegisterContextThreadMemory.


Modified:
    lldb/trunk/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp

Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp?rev=180908&r1=180907&r2=180908&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp Wed May  1 23:15:24 2013
@@ -50,16 +50,17 @@ RegisterContextThreadMemory::UpdateRegis
             }
             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);
+                }                
             }
         }
     }





More information about the lldb-commits mailing list