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): ...@@ -887,7 +887,7 @@ class CyStep(CythonExecutionControlCommand, libpython.PythonStepperMixin):
def invoke(self, args, from_tty): def invoke(self, args, from_tty):
if self.is_python_function(): if self.is_python_function():
self.python_step(self.stepinto) self.python_step(args, self.stepinto)
elif not self.is_cython_function(): elif not self.is_cython_function():
if self.stepinto: if self.stepinto:
command = 'step' command = 'step'
......
...@@ -2197,7 +2197,7 @@ class PythonStepperMixin(object): ...@@ -2197,7 +2197,7 @@ class PythonStepperMixin(object):
CythonCodeStepper at the same time 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 # Set a watchpoint for a frame once as deleting it will make py-step
# unrepeatable. # unrepeatable.
# See http://sourceware.org/bugzilla/show_bug.cgi?id=12216 # See http://sourceware.org/bugzilla/show_bug.cgi?id=12216
...@@ -2218,6 +2218,12 @@ class PythonStepperMixin(object): ...@@ -2218,6 +2218,12 @@ class PythonStepperMixin(object):
# watchpoint = match.group(1) # watchpoint = match.group(1)
# gdb.execute('delete %s' % watchpoint) # 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): class PyStep(ExecutionControlCommandBase, PythonStepperMixin):
"Step through Python code." "Step through Python code."
...@@ -2225,7 +2231,7 @@ class PyStep(ExecutionControlCommandBase, PythonStepperMixin): ...@@ -2225,7 +2231,7 @@ class PyStep(ExecutionControlCommandBase, PythonStepperMixin):
stepinto = True stepinto = True
def invoke(self, args, from_tty): def invoke(self, args, from_tty):
self.python_step(stepinto=self.stepinto) self.python_step(args, stepinto=self.stepinto)
class PyNext(PyStep): class PyNext(PyStep):
"Step-over Python code." "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