[Lldb-commits] [lldb] r185474 - Mark the "step over single instruction" plan private in the StopInfoWatchpoint::PerformAction to

Jim Ingham jingham at apple.com
Tue Jul 2 14:12:44 PDT 2013


Author: jingham
Date: Tue Jul  2 16:12:44 2013
New Revision: 185474

URL: http://llvm.org/viewvc/llvm-project?rev=185474&view=rev
Log:
Mark the "step over single instruction" plan private in the StopInfoWatchpoint::PerformAction to
ensure that the watchpoint not the step is reported as the stop reason.  Also, stash away & restore
the current stop reason just so it can't go away on us.

Modified:
    lldb/trunk/source/Target/StopInfo.cpp

Modified: lldb/trunk/source/Target/StopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/StopInfo.cpp?rev=185474&r1=185473&r2=185474&view=diff
==============================================================================
--- lldb/trunk/source/Target/StopInfo.cpp (original)
+++ lldb/trunk/source/Target/StopInfo.cpp Tue Jul  2 16:12:44 2013
@@ -667,16 +667,20 @@ protected:
                         {
                             if (!wp_triggers_after)
                             {
+                                StopInfoSP stored_stop_info_sp = thread_sp->GetStopInfo();
+                                assert (stored_stop_info_sp.get() == this);
+                                
                                 ThreadPlan *new_plan = thread_sp->QueueThreadPlanForStepSingleInstruction(false, // step-over
                                                                                                         false, // abort_other_plans
                                                                                                         true); // stop_other_threads
                                 new_plan->SetIsMasterPlan (true);
                                 new_plan->SetOkayToDiscard (false);
+                                new_plan->SetPrivate (true);
                                 process->GetThreadList().SetSelectedThreadByID (thread_sp->GetID());
                                 process->Resume ();
                                 process->WaitForProcessToStop (NULL);
                                 process->GetThreadList().SetSelectedThreadByID (thread_sp->GetID());
-                                MakeStopInfoValid(); // make sure we do not fail to stop because of the single-step taken above
+                                thread_sp->SetStopInfo(stored_stop_info_sp);
                             }
                         }
                     }





More information about the lldb-commits mailing list