public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin/cygwin-3_3-branch] Cygwin: pty: Fix Ctrl-C behaviour in latest GDB.
@ 2022-04-18 12:02 Takashi Yano
0 siblings, 0 replies; only message in thread
From: Takashi Yano @ 2022-04-18 12:02 UTC (permalink / raw)
To: cygwin-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=6c22956ad8f169bea8a544bfc2302dc2bc120981
commit 6c22956ad8f169bea8a544bfc2302dc2bc120981
Author: Takashi Yano <takashi.yano@nifty.ne.jp>
Date: Mon Apr 18 20:43:44 2022 +0900
Cygwin: pty: Fix Ctrl-C behaviour in latest GDB.
- In the latest GDB (11.2-1), Ctrl-C behaviour is broken a bit for
non-cygwin inferior. For example, Ctrl-C on GDB prompt is not sent
to GDB but to the inferior. This patch fixes the issue.
Diff:
---
winsup/cygwin/fhandler_termios.cc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc
index daec1844f..0d53ad25f 100644
--- a/winsup/cygwin/fhandler_termios.cc
+++ b/winsup/cygwin/fhandler_termios.cc
@@ -349,7 +349,8 @@ fhandler_termios::process_sigs (char c, tty* ttyp, fhandler_termios *fh)
cygwin apps started from non-cygwin shell. */
if (c == '\003' && p && p->ctty == ttyp->ntty && p->pgid == pgid
&& ((p->process_state & PID_NOTCYGWIN)
- || (p->process_state & PID_NEW_PG)
+ || ((p->process_state & PID_NEW_PG)
+ && ttyp->pcon_input_state_eq (tty::to_nat))
|| !(p->process_state & PID_CYGPARENT)))
{
/* Ctrl-C event will be sent only to the processes attaching
@@ -423,6 +424,7 @@ fhandler_termios::process_sigs (char c, tty* ttyp, fhandler_termios *fh)
with_debugger = true; /* inferior is cygwin app */
if (!(p->process_state & PID_NOTCYGWIN)
&& (p->process_state & PID_NEW_PG) /* Check marker */
+ && ttyp->pcon_input_state_eq (tty::to_nat)
&& p->pid == pgid)
with_debugger_nat = true; /* inferior is non-cygwin app */
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-04-18 12:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-18 12:02 [newlib-cygwin/cygwin-3_3-branch] Cygwin: pty: Fix Ctrl-C behaviour in latest GDB Takashi Yano
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).