Commit 05444495 authored by Mark Florisson's avatar Mark Florisson

Disable watchpoint stepping by default (use cy step -w or cy step --watchpoint...

Disable watchpoint stepping by default (use cy step -w or cy step --watchpoint to enable) as hardware watchpoints are limited.
parent e325fbee
......@@ -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'
......
......@@ -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
......@@ -2218,6 +2218,12 @@ class PythonStepperMixin(object):
# 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."
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment