Index: Lib/pdb.py =================================================================== --- Lib/pdb.py (revision 66978) +++ Lib/pdb.py (working copy) @@ -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" Index: Lib/bdb.py =================================================================== --- Lib/bdb.py (revision 66978) +++ Lib/bdb.py (working copy) @@ -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 #