mirror of https://github.com/python/cpython
Merged revisions 67000 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r67000 | benjamin.peterson | 2008-10-22 16:16:34 -0500 (Wed, 22 Oct 2008) | 1 line fix #4150: pdb's up command didn't work for generators in post-mortem ........
This commit is contained in:
parent
3e80861cb7
commit
af956f1d48
|
@ -320,6 +320,8 @@ class Bdb:
|
||||||
while t is not None:
|
while t is not None:
|
||||||
stack.append((t.tb_frame, t.tb_lineno))
|
stack.append((t.tb_frame, t.tb_lineno))
|
||||||
t = t.tb_next
|
t = t.tb_next
|
||||||
|
if f is None:
|
||||||
|
i = max(0, len(stack) - 1)
|
||||||
return stack, i
|
return stack, i
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -1224,9 +1224,7 @@ def post_mortem(t=None):
|
||||||
|
|
||||||
p = Pdb()
|
p = Pdb()
|
||||||
p.reset()
|
p.reset()
|
||||||
while t.tb_next is not None:
|
p.interaction(None, t)
|
||||||
t = t.tb_next
|
|
||||||
p.interaction(t.tb_frame, t)
|
|
||||||
|
|
||||||
def pm():
|
def pm():
|
||||||
post_mortem(sys.last_traceback)
|
post_mortem(sys.last_traceback)
|
||||||
|
@ -1289,9 +1287,7 @@ def main():
|
||||||
print "Uncaught exception. Entering post mortem debugging"
|
print "Uncaught exception. Entering post mortem debugging"
|
||||||
print "Running 'cont' or 'step' will restart the program"
|
print "Running 'cont' or 'step' will restart the program"
|
||||||
t = sys.exc_info()[2]
|
t = sys.exc_info()[2]
|
||||||
while t.tb_next is not None:
|
pdb.interaction(None, t)
|
||||||
t = t.tb_next
|
|
||||||
pdb.interaction(t.tb_frame,t)
|
|
||||||
print "Post mortem debugger finished. The "+mainpyfile+" will be restarted"
|
print "Post mortem debugger finished. The "+mainpyfile+" will be restarted"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,9 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #4150: Pdb's "up" command now works for generator frames in post-mortem
|
||||||
|
debugging.
|
||||||
|
|
||||||
- Issue #4092: Return ArgInfo as promised in the documentation from
|
- Issue #4092: Return ArgInfo as promised in the documentation from
|
||||||
inspect.getargvalues.
|
inspect.getargvalues.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue