[Lldb-commits] [lldb] r162323 - /lldb/trunk/source/Target/StopInfo.cpp

Johnny Chen johnny.chen at apple.com
Tue Aug 21 15:15:58 PDT 2012


Author: johnny
Date: Tue Aug 21 17:15:58 2012
New Revision: 162323

URL: http://llvm.org/viewvc/llvm-project?rev=162323&view=rev
Log:
Remove the process->DisableWatchpoint() and EnableWatchpoint() calls since the sentry object is already doing that.

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=162323&r1=162322&r2=162323&view=diff
==============================================================================
--- lldb/trunk/source/Target/StopInfo.cpp (original)
+++ lldb/trunk/source/Target/StopInfo.cpp Tue Aug 21 17:15:58 2012
@@ -483,6 +483,8 @@
             ExecutionContext exe_ctx (m_thread.GetStackFrameAtIndex(0));
             Process* process = exe_ctx.GetProcessPtr();
 
+            // This sentry object makes sure the current watchpoint is disabled while performing watchpoint actions,
+            // and it is then enabled after we are finished.
             WatchpointSentry sentry(process, wp_sp.get());
 
             {
@@ -496,8 +498,6 @@
                     {
                         if (!wp_triggers_after)
                         {
-                            process->DisableWatchpoint(wp_sp.get());
-                            
                             ThreadPlan *new_plan = m_thread.QueueThreadPlanForStepSingleInstruction(false, // step-over
                                                                                                     false, // abort_other_plans
                                                                                                     true); // stop_other_threads
@@ -508,8 +508,6 @@
                             process->WaitForProcessToStop (NULL);
                             process->GetThreadList().SetSelectedThreadByID (m_thread.GetID());
                             MakeStopInfoValid(); // make sure we do not fail to stop because of the single-step taken above
-                            
-                            process->EnableWatchpoint(wp_sp.get());
                         }
                     }
                 }





More information about the lldb-commits mailing list