[Lldb-commits] [lldb] r194487 - Log failure to restore thread state in ThreadPlanCallFunction::DoTakedown

Ed Maste emaste at freebsd.org
Tue Nov 12 08:47:08 PST 2013


Author: emaste
Date: Tue Nov 12 10:47:08 2013
New Revision: 194487

URL: http://llvm.org/viewvc/llvm-project?rev=194487&view=rev
Log:
Log failure to restore thread state in ThreadPlanCallFunction::DoTakedown

In order to help track down llvm.org/pr17226.

Modified:
    lldb/trunk/source/Target/Thread.cpp
    lldb/trunk/source/Target/ThreadPlanCallFunction.cpp

Modified: lldb/trunk/source/Target/Thread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Thread.cpp?rev=194487&r1=194486&r2=194487&view=diff
==============================================================================
--- lldb/trunk/source/Target/Thread.cpp (original)
+++ lldb/trunk/source/Target/Thread.cpp Tue Nov 12 10:47:08 2013
@@ -511,8 +511,7 @@ Thread::CheckpointThreadState (ThreadSta
 bool
 Thread::RestoreRegisterStateFromCheckpoint (ThreadStateCheckpoint &saved_state)
 {
-    RestoreSaveFrameZero(saved_state.register_backup);
-    return true;
+    return RestoreSaveFrameZero(saved_state.register_backup);
 }
 
 bool

Modified: lldb/trunk/source/Target/ThreadPlanCallFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanCallFunction.cpp?rev=194487&r1=194486&r2=194487&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlanCallFunction.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanCallFunction.cpp Tue Nov 12 10:47:08 2013
@@ -224,7 +224,11 @@ ThreadPlanCallFunction::DoTakedown (bool
         m_takedown_done = true;
         m_stop_address = m_thread.GetStackFrameAtIndex(0)->GetRegisterContext()->GetPC();
         m_real_stop_info_sp = GetPrivateStopInfo ();
-        m_thread.RestoreRegisterStateFromCheckpoint(m_stored_thread_state);
+        if (!m_thread.RestoreRegisterStateFromCheckpoint(m_stored_thread_state))
+        {
+            if (log)
+                log->Printf("ThreadPlanCallFunction(%p): DoTakedown failed to restore register state", this);
+        }
         SetPlanComplete(success);
         ClearBreakpoints();
         if (log && log->GetVerbose())





More information about the lldb-commits mailing list