public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH][PR gdb/8527] Interrupt not functional in Eclipse/CDT on Solaris
@ 2018-08-07 19:13 Brian Vandenberg
  2018-11-01 21:19 ` Joel Brobecker
  0 siblings, 1 reply; 12+ messages in thread
From: Brian Vandenberg @ 2018-08-07 19:13 UTC (permalink / raw)
  To: gdb-patches

[-- 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;

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

end of thread, other threads:[~2019-03-05 18:58 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-07 19:13 [PATCH][PR gdb/8527] Interrupt not functional in Eclipse/CDT on Solaris Brian Vandenberg
2018-11-01 21:19 ` Joel Brobecker
2018-11-01 21:46   ` Brian Vandenberg
2018-11-09 22:08     ` Simon Marchi
2018-11-09 22:22       ` Rainer Orth
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

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).