Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue7245] better Ctrl-C support in pdb (program can be resumed)

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

Oct 31, 2009, 12:37 PM

Post #1 of 3 (246 views)
Permalink
[issue7245] better Ctrl-C support in pdb (program can be resumed)

New submission from Ilya Sandler <ilya.sandler [at] gmail>:

Currently, pressing Ctrl-C in pdb will terminate the program and throw
the user into post-mortem debugging.

Other debuggers (e.g gdb and pydb) treat Ctrl-C differently: Ctrl-C only
stops the program and the user can resume it if needed.

I believe current pdb behavior is user-unfriendly (as wanting to stop
and then resume the execution is a very common use case which is not
supported by pdb at all (I think)).


The attached patch changes pdb's Ctrl-C behavior to match
gdb's: Ctrl-C will stop the program and the user can resume the
execution later.

----------
components: Library (Lib)
files: sig.patch.v0
messages: 94764
nosy: isandler
severity: normal
status: open
title: better Ctrl-C support in pdb (program can be resumed)
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file15241/sig.patch.v0

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7245>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Oct 31, 2009, 10:20 PM

Post #2 of 3 (219 views)
Permalink
[issue7245] better Ctrl-C support in pdb (program can be resumed) [In reply to]

Raghuram Devarakonda <draghuram [at] gmail> added the comment:

It is better for this functionality to be added in "Cmd" module as that
will benefit all users of that module. Please see bug #1294 which has a
patch for this purpose. It would be nice if you can test with that patch
and see if pdb works as you expected.

----------
nosy: +draghuram

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7245>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Nov 1, 2009, 2:44 PM

Post #3 of 3 (210 views)
Permalink
[issue7245] better Ctrl-C support in pdb (program can be resumed) [In reply to]

Ilya Sandler <ilya.sandler [at] gmail> added the comment:

No,I don't think patch in the issue #1294 addresses the problem which
I'm trying to solve.

I tried applying patch#1294, and Ctrl-C will still throws your debugger
into postmortem mode and I don't think you can change that by overriding
do_KeyboardInterrupt(): when do_KbdInterrupt() is called you cannot
resume execution (or at least I don't know any way of doing it).

My patch handles the SIGINT directly which allows it to set tracing and
resume the program immediately (and keyboardinterrupt is never raised)

I'll also add comments to patch#1294

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7245>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.