[Python-checkins] r67000 - in python/trunk: Lib/bdb.py Lib/pdb.py Misc/NEWS
benjamin.peterson
python-checkins at python.org
Wed Oct 22 23:16:34 CEST 2008
Author: benjamin.peterson
Date: Wed Oct 22 23:16:34 2008
New Revision: 67000
Log:
fix #4150: pdb's up command didn't work for generators in post-mortem
Modified:
python/trunk/Lib/bdb.py
python/trunk/Lib/pdb.py
python/trunk/Misc/NEWS
Modified: python/trunk/Lib/bdb.py
==============================================================================
--- python/trunk/Lib/bdb.py (original)
+++ python/trunk/Lib/bdb.py Wed Oct 22 23:16:34 2008
@@ -320,6 +320,8 @@
while t is not None:
stack.append((t.tb_frame, t.tb_lineno))
t = t.tb_next
+ if f is None:
+ i = max(0, len(stack) - 1)
return stack, i
#
Modified: python/trunk/Lib/pdb.py
==============================================================================
--- python/trunk/Lib/pdb.py (original)
+++ python/trunk/Lib/pdb.py Wed Oct 22 23:16:34 2008
@@ -1224,9 +1224,7 @@
p = Pdb()
p.reset()
- while t.tb_next is not None:
- t = t.tb_next
- p.interaction(t.tb_frame, t)
+ p.interaction(None, t)
def pm():
post_mortem(sys.last_traceback)
@@ -1289,9 +1287,7 @@
print "Uncaught exception. Entering post mortem debugging"
print "Running 'cont' or 'step' will restart the program"
t = sys.exc_info()[2]
- while t.tb_next is not None:
- t = t.tb_next
- pdb.interaction(t.tb_frame,t)
+ pdb.interaction(None, t)
print "Post mortem debugger finished. The "+mainpyfile+" will be restarted"
Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS (original)
+++ python/trunk/Misc/NEWS Wed Oct 22 23:16:34 2008
@@ -24,6 +24,9 @@
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
inspect.getargvalues.
More information about the Python-checkins
mailing list