This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug python/13265] SIGINT handling
- From: "khooyp at cs dot umd.edu" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Tue, 10 Jan 2012 01:03:14 +0000
- Subject: [Bug python/13265] SIGINT handling
- Auto-submitted: auto-generated
- References: <bug-13265-4717@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=13265
--- Comment #1 from Khoo Yit Phang <khooyp at cs dot umd.edu> 2012-01-10 01:03:14 UTC ---
Created attachment 6156
--> http://sourceware.org/bugzilla/attachment.cgi?id=6156
Patch to allow SIGINT to interrupt the "python" command.
I've attached a patch that allows SIGINT to interrupt a "python" command. It
works by installing a Python-specific SIGINT handler just before executing a
Python script, and restoring the original SIGINT handler after execution as
well as at calls to gdb.execute(...).
There's one caveat: if an inferior is running via, e.g., gdb.execute("run"),
SIGINT will interrupt the inferior but not the enclosing "python" command. I
think it would be better to also interrupt the "python" command, but I'm not
sure how to detect this case yet.
--
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.