Mark the "step over single instruction" plan private in the StopInfoWatchpoint::Perfo...
authorJim Ingham <jingham@apple.com>
Tue, 2 Jul 2013 21:12:44 +0000 (21:12 +0000)
committerJim Ingham <jingham@apple.com>
Tue, 2 Jul 2013 21:12:44 +0000 (21:12 +0000)
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.

llvm-svn: 185474

lldb/source/Target/StopInfo.cpp

index 3be1f93..23b0b5d 100644 (file)
@@ -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);
                             }
                         }
                     }