This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug python/14291] New: python KeyboardInterrupt not caught
- From: "eager at eagercon dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Mon, 25 Jun 2012 12:10:09 +0000
- Subject: [Bug python/14291] New: python KeyboardInterrupt not caught
- Auto-submitted: auto-generated
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.