summaryrefslogtreecommitdiffstats
path: root/Lib/pdb.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-01-12 23:26:55 (GMT)
committerGuido van Rossum <guido@python.org>1992-01-12 23:26:55 (GMT)
commitd6c3f25f3e1b7b1177c8995569577a3fa49ec551 (patch)
tree59a6b960590c0740ea066f3b229286a4b3092264 /Lib/pdb.py
parentbba77af37aeaf2ee4dbbe1c2d517f9b93a54701b (diff)
downloadcpython-d6c3f25f3e1b7b1177c8995569577a3fa49ec551.zip
cpython-d6c3f25f3e1b7b1177c8995569577a3fa49ec551.tar.gz
cpython-d6c3f25f3e1b7b1177c8995569577a3fa49ec551.tar.bz2
react to interrupts differently
Diffstat (limited to 'Lib/pdb.py')
-rwxr-xr-xLib/pdb.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/pdb.py b/Lib/pdb.py
index 259c770..9807202 100755
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -9,6 +9,8 @@
# - Where and when to stop exactly when 'next' encounters a return?
# (should be level-based -- don't trace anything deeper than current)
# - Show stack traces upside-down (like dbx/gdb)
+# - When stopping on an exception, show traceback stack
+# - Merge with tb (for post-mortem usage)
import string
import sys
@@ -120,6 +122,9 @@ class Pdb(Cmd):
if self.botframe is None:
self.botframe = frame
if where == 'exception':
+ if self.whatnext == 'continue' and \
+ arg[0] is not KeyboardInterrupt:
+ return self.trace
stop = 1
elif self.whatnext == 'continue':
stop = 0