From: Brian Vandenberg <phantall@gmail.com>
To: gdb-patches@sourceware.org
Subject: [PATCH][PR gdb/8527] Interrupt not functional in Eclipse/CDT on Solaris
Date: Tue, 07 Aug 2018 19:13:00 -0000 [thread overview]
Message-ID: <CAEJ-0i_YWq+__iD079Z=RNws+pa8QQD4uBqqbLb7jc4QvCdCQQ@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 877 bytes --]
In Solaris:
If gdb attaches to a process that either has no controlling terminal,
or the controlling terminal differs from the one gdb is running under,
break/^C doesn't interrupt the debugged process.
This is a fix that was proposed for this problem quite awhile ago but
never implemented; it's been in the Adacore GDB branch for quite
awhile.
Without going into unnecessary details I cannot easily run the test
suite against this change right now. If this patch gets rejected
based on that, when I have time I'll see about getting IllumOS
installed in a VM and test it there, but the problem was originally
found in sparc Solaris.
----
note: this patch was tested against 8.1.1. It looks like it probably
still applies on the 8.2 branch, but I won't be able to test it until
8.2 is released.
-brian
ps, my assignment/release forms were completed/received 10/30/2017
[-- Attachment #2: gdb-8527-patch, revised.txt --]
[-- Type: text/plain, Size: 784 bytes --]
gdb/Changelog:
2018-08-07 Brian Vandenberg <phantall@gmail.com>
PR gdb/8527
* procfs.c (proc_wait_for_stop): calls to set_sigint_trap and
clear_sigint_trap.
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 7b7ff45..7cd870c 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -913,7 +913,12 @@ proc_wait_for_stop (procinfo *pi)
procfs_ctl_t cmd = PCWSTOP;
+ /* PR gdb/8527
+ * Was not correctly interrupting the inferior process
+ * when ^C was pressed in the debug terminal.
+ */
+ set_sigint_trap();
+
win = (write (pi->ctl_fd, (char *) &cmd, sizeof (cmd)) == sizeof (cmd));
+
+ /* PR gdb/8527 */
+ clear_sigint_trap();
+
/* We been runnin' and we stopped -- need to update status. */
pi->status_valid = 0;
next reply other threads:[~2018-08-07 19:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-07 19:13 Brian Vandenberg [this message]
2018-11-01 21:19 ` Joel Brobecker
2018-11-01 21:46 ` Brian Vandenberg
2018-11-09 22:08 ` Simon Marchi
2018-11-22 10:19 ` Rainer Orth
2019-02-26 15:14 ` Rainer Orth
2019-02-26 16:09 ` Pedro Alves
2019-02-26 20:03 ` Rainer Orth
2019-02-28 15:16 ` Rainer Orth
2019-03-05 15:47 ` Tom Tromey
2019-03-05 18:58 ` Pedro Alves
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='CAEJ-0i_YWq+__iD079Z=RNws+pa8QQD4uBqqbLb7jc4QvCdCQQ@mail.gmail.com' \
--to=phantall@gmail.com \
--cc=gdb-patches@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: link
Be 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