aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/event-top.c9
-rw-r--r--gdb/utils.c4
3 files changed, 14 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index aa23a65..9d3ff4a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2016-04-12 Pedro Alves <palves@redhat.com>
+ * event-top.c (stdin_event_handler): Call QUIT;
+ (prompt_for_continue): Don't run with immediate_quit set.
+
+2016-04-12 Pedro Alves <palves@redhat.com>
+
* tui/tui-io.c (tui_redisplay_readline): Check
gdb_in_secondary_prompt_p instead of immediate_quit.
* tui/tui.c: Include top.h.
diff --git a/gdb/event-top.c b/gdb/event-top.c
index eb4f0b9..a119fe9 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -403,6 +403,15 @@ stdin_event_handler (int error, gdb_client_data client_data)
}
else
{
+ /* This makes sure a ^C immediately followed by further input is
+ always processed in that order. E.g,. with input like
+ "^Cprint 1\n", the SIGINT handler runs, marks the async signal
+ handler, and then select/poll may return with stdin ready,
+ instead of -1/EINTR. The
+ gdb.base/double-prompt-target-event-error.exp test exercises
+ this. */
+ QUIT;
+
do
{
call_stdin_event_handler_again_p = 0;
diff --git a/gdb/utils.c b/gdb/utils.c
index 62e169a..3c7a29c 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -1865,9 +1865,6 @@ prompt_for_continue (void)
beyond the end of the screen. */
reinitialize_more_filter ();
- immediate_quit++;
- QUIT;
-
/* We'll need to handle input. */
target_terminal_ours ();
@@ -1895,7 +1892,6 @@ prompt_for_continue (void)
throw_quit ("Quit");
xfree (ignore);
}
- immediate_quit--;
/* Now we have to do this again, so that GDB will know that it doesn't
need to save the ---Type <return>--- line at the top of the screen. */