Disable watchpoint stepping by default (use cy step -w or cy step --watchpoint to...
authorMark Florisson <markflorisson88@gmail.com>
Tue, 14 Dec 2010 23:05:51 +0000 (00:05 +0100)
committerMark Florisson <markflorisson88@gmail.com>
Tue, 14 Dec 2010 23:05:51 +0000 (00:05 +0100)
Cython/Debugger/libcython.py
Cython/Debugger/libpython.py

index 7d2a7320ef2c7b142e07c1a40a06ca747f2c1cbe..4648d522a45448b143dc3ebe98fd0dd80e5168e0 100644 (file)
@@ -887,7 +887,7 @@ class CyStep(CythonExecutionControlCommand, libpython.PythonStepperMixin):
     
     def invoke(self, args, from_tty):
         if self.is_python_function():
-            self.python_step(self.stepinto)
+            self.python_step(args, self.stepinto)
         elif not self.is_cython_function():
             if self.stepinto:
                 command = 'step'
index 75c785056ab19567cae545e9c11af63c6de7682e..e9b6d8c353175d66c283e34c2f4578591606e85e 100644 (file)
@@ -2197,7 +2197,7 @@ class PythonStepperMixin(object):
     CythonCodeStepper at the same time
     """
     
-    def python_step(self, stepinto):
+    def _watchpoint_step(self, stepinto):
         # Set a watchpoint for a frame once as deleting it will make py-step
         # unrepeatable. 
         # See http://sourceware.org/bugzilla/show_bug.cgi?id=12216
@@ -2217,7 +2217,13 @@ class PythonStepperMixin(object):
         # if match:
             # watchpoint = match.group(1)
             # gdb.execute('delete %s' % watchpoint)
-
+    
+    def python_step(self, args, stepinto):
+        if args in ('-w', '--watchpoint'):
+            self._watchpoint_step(stepinto)
+        else:
+            self.step(stepinto)
+    
 
 class PyStep(ExecutionControlCommandBase, PythonStepperMixin):
     "Step through Python code."
@@ -2225,7 +2231,7 @@ class PyStep(ExecutionControlCommandBase, PythonStepperMixin):
     stepinto = True
     
     def invoke(self, args, from_tty):
-        self.python_step(stepinto=self.stepinto)
+        self.python_step(args, stepinto=self.stepinto)
     
 class PyNext(PyStep):
     "Step-over Python code."