From 05444495597b50f8978c70c7f1f3b1d51058aae3 Mon Sep 17 00:00:00 2001 From: Mark Florisson Date: Wed, 15 Dec 2010 00:05:51 +0100 Subject: [PATCH] Disable watchpoint stepping by default (use cy step -w or cy step --watchpoint to enable) as hardware watchpoints are limited. --- Cython/Debugger/libcython.py | 2 +- Cython/Debugger/libpython.py | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Cython/Debugger/libcython.py b/Cython/Debugger/libcython.py index 7d2a7320..4648d522 100644 --- a/Cython/Debugger/libcython.py +++ b/Cython/Debugger/libcython.py @@ -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' diff --git a/Cython/Debugger/libpython.py b/Cython/Debugger/libpython.py index 75c78505..e9b6d8c3 100644 --- a/Cython/Debugger/libpython.py +++ b/Cython/Debugger/libpython.py @@ -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." -- 2.26.2