gdb/Changelog: 2018-08-07 Brian Vandenberg 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;