summaryrefslogtreecommitdiff
path: root/gdb/event-top.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-08-22 17:48:45 +0000
committerTom Tromey <tromey@redhat.com>2012-08-22 17:48:45 +0000
commite493a2763e7b1f4f0621651eb75c5ab81b3345d3 (patch)
treefacfb07c1e702fd1bf7d828a0157a58528b92d4d /gdb/event-top.c
parentcf9cee187411f994b30fdedfbe19c79cd266b8d8 (diff)
downloadgdb-e493a2763e7b1f4f0621651eb75c5ab81b3345d3.tar.gz
* defs.h (quit_flag): Don't declare.
(clear_quit_flag, check_quit_flag, set_quit_flag): Declare. (QUIT): Use new functions. * event-top.c (command_handler): Use clear_quit_flag. (handle_sigint): Use set_quit_flag. (async_request_quit): Use check_quit_flag. Don't check immediate_quit. * exceptions.c (throw_exception): Use clear_quit_flag. * main.c (captured_main): Use clear_quit_flag. * python/python.c (clear_quit_flag, set_quit_flag) (check_quit_flag): New functions. * remote-sim.c (gdb_os_poll_quit): Use check_quit_flag, clear_quit_flag. * remote.c (remote_wait_as): Use check_quit_flag, clear_quit_flag. (remote_start_remote): Call QUIT. * symfile.c (load_progress): Use check_quit_flag. * top.c (command_loop): Use clear_quit_flag. (command_line_input): Call QUIT. * utils.c (quit_flag): Conditionally define. (clear_quit_flag, check_quit_flag, set_quit_flag): New functions. (prompt_for_continue): Call QUIT. Use quit, not async_request_quit. * remote-mips.c (mips_expect_timeout): Call QUIT. * monitor.c (monitor_expect): Call QUIT.
Diffstat (limited to 'gdb/event-top.c')
-rw-r--r--gdb/event-top.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gdb/event-top.c b/gdb/event-top.c
index b4a67908595..4f3363c63ed 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -409,7 +409,7 @@ command_handler (char *command)
int stdin_is_tty = ISATTY (stdin);
struct cleanup *stat_chain;
- quit_flag = 0;
+ clear_quit_flag ();
if (instream == stdin && stdin_is_tty)
reinitialize_more_filter ();
@@ -788,7 +788,7 @@ handle_sigint (int sig)
set quit_flag to 1 here. Then if QUIT is called before we get to
the event loop, we will unwind as expected. */
- quit_flag = 1;
+ set_quit_flag ();
/* If immediate_quit is set, we go ahead and process the SIGINT right
away, even if we usually would defer this to the event loop. The
@@ -817,10 +817,9 @@ async_request_quit (gdb_client_data arg)
/* If the quit_flag has gotten reset back to 0 by the time we get
back here, that means that an exception was thrown to unwind the
current command before we got back to the event loop. So there
- is no reason to call quit again here, unless immediate_quit is
- set. */
+ is no reason to call quit again here. */
- if (quit_flag || immediate_quit)
+ if (check_quit_flag ())
quit ();
}