This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch 1/3] make prompt_for_continue call throw_quit directly
- From: Sandra Loosemore <sandra at codesourcery dot com>
- To: gdb-patches <gdb-patches at sourceware dot org>, Pedro Alves <palves at redhat dot com>
- Date: Fri, 18 Dec 2015 12:30:29 -0700
- Subject: [patch 1/3] make prompt_for_continue call throw_quit directly
- Authentication-results: sourceware.org; auth=none
- References: <56745D29 dot 504 at codesourcery dot com>
This is the patch previously suggested by Pedro here:
https://sourceware.org/ml/gdb-patches/2015-09/msg00637.html
to fix a problem I ran into when testing on a remote Windows host via
SSH without a terminal or job control. As Pedro said, when typing 'q'
in response to a pagination prompt, there's no possibility of a SIGINT
so we can bypass the parts of quit() handling that are intended to
intercept ^C instead.
I confirmed that this fixes the bogus quit message I observed previously
on Windows host, and did full regression testing on Linux host for
nios2-linux-gnu target.
OK to commit?
-Sandra
2015-12-18 Sandra Loosemore <sandra@codesourcery.com>
gdb/
* utils.c (prompt_for_continue): Call throw_quit directly on 'q'.
diff --git a/gdb/utils.c b/gdb/utils.c
index 284fbbb..862a802 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -1868,7 +1868,7 @@ prompt_for_continue (void)
while (*p == ' ' || *p == '\t')
++p;
if (p[0] == 'q')
- quit ();
+ throw_quit ("Quit");
xfree (ignore);
}
immediate_quit--;