diff options
author | Georg Brandl <georg@python.org> | 2010-07-30 10:29:19 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-07-30 10:29:19 (GMT) |
commit | 3f94089a77d95792c3adc087bbb0309ff9d592dc (patch) | |
tree | 369beca901c97541bcca79785bfbc8139c8f97db /Lib/bdb.py | |
parent | d72e043bddf965ce1cdc7a85baef1d3e929df070 (diff) | |
download | cpython-3f94089a77d95792c3adc087bbb0309ff9d592dc.zip cpython-3f94089a77d95792c3adc087bbb0309ff9d592dc.tar.gz cpython-3f94089a77d95792c3adc087bbb0309ff9d592dc.tar.bz2 |
#5294: Fix the behavior of pdb "continue" command when called in the top-level debugged frame.
Diffstat (limited to 'Lib/bdb.py')
-rw-r--r-- | Lib/bdb.py | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -109,6 +109,8 @@ class Bdb: self.is_skipped_module(frame.f_globals.get('__name__')): return False if frame is self.stopframe: + if self.stoplineno == -1: + return False return frame.f_lineno >= self.stoplineno while frame is not None and frame is not self.stopframe: if frame is self.botframe: @@ -165,10 +167,12 @@ class Bdb: but only if we are to stop at or just below this level.""" pass - def _set_stopinfo(self, stopframe, returnframe, stoplineno=-1): + def _set_stopinfo(self, stopframe, returnframe, stoplineno=0): self.stopframe = stopframe self.returnframe = returnframe self.quitting = 0 + # stoplineno >= 0 means: stop at line >= the stoplineno + # stoplineno -1 means: don't stop at all self.stoplineno = stoplineno # Derived classes and clients can call the following methods @@ -184,7 +188,7 @@ class Bdb: def set_step(self): """Stop after one line of code.""" - self._set_stopinfo(None,None) + self._set_stopinfo(None, None) def set_next(self, frame): """Stop on the next line in or below the given frame.""" @@ -211,7 +215,7 @@ class Bdb: def set_continue(self): # Don't stop except at breakpoints or when finished - self._set_stopinfo(self.botframe, None) + self._set_stopinfo(self.botframe, None, -1) if not self.breaks: # no breakpoints; run without debugger overhead sys.settrace(None) |