public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug python/14291] New: python KeyboardInterrupt not caught
@ 2012-06-25 12:12 eager at eagercon dot com
  2012-06-25 12:21 ` [Bug python/14291] " eager at eagercon dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: eager at eagercon dot com @ 2012-06-25 12:12 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14291

             Bug #: 14291
           Summary: python KeyboardInterrupt not caught
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: python
        AssignedTo: unassigned@sourceware.org
        ReportedBy: eager@eagercon.com
    Classification: Unclassified


Created attachment 6478
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6478
Patch to test for KeyboardInterrupt

GDB does not pass the KeyboardInterrupt exception to Python when the user
terminates paged terminal output generated by Python.  This causes Python
scripts to terminate when the user interrupts output.  

(gdb) set height 5
(gdb) python
>try:
>    for i in range(400):
>        print i
>except KeyboardInterrupt:
>    print "caught interrupt"
>end
0
1
2
3
---Type <return> to continue, or q <return> to quit---q
Quit


When the output is generated by a GDB command, the exception is caught and
passed to Python.

(gdb) python
>try:
>    gdb.execute("help all")
>except KeyboardInterrupt:
>    print "caught interrupt"
>end

Command class: aliases

ni -- Step one instruction
---Type <return> to continue, or q <return> to quit---q
caught interrupt

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-08-03 19:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-25 12:12 [Bug python/14291] New: python KeyboardInterrupt not caught eager at eagercon dot com
2012-06-25 12:21 ` [Bug python/14291] " eager at eagercon dot com
2012-08-03 17:58 ` tromey at redhat dot com
2012-08-03 19:23 ` eager at eagercon dot com
2012-08-03 19:25 ` tromey at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).