public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "eager at eagercon dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug python/14291] New: python KeyboardInterrupt not caught Date: Mon, 25 Jun 2012 12:12:00 -0000 [thread overview] Message-ID: <bug-14291-4717@http.sourceware.org/bugzilla/> (raw) 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.
next reply other threads:[~2012-06-25 12:12 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-06-25 12:12 eager at eagercon dot com [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-14291-4717@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).