aboutsummaryrefslogtreecommitdiff
path: root/gdb/defs.h
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2023-02-27 16:11:37 -0700
committerKevin Buettner <kevinb@redhat.com>2023-02-27 16:20:39 -0700
commit80d03917838c16ee0da53a4a8642d5df3bee724e (patch)
tree8a5c0b18623ebfde5011b8b181409915910c0f97 /gdb/defs.h
parent363429d593eb1eb17f3f2cf6c247f60fadf660d9 (diff)
downloadfsf-binutils-gdb-80d03917838c16ee0da53a4a8642d5df3bee724e.zip
fsf-binutils-gdb-80d03917838c16ee0da53a4a8642d5df3bee724e.tar.gz
fsf-binutils-gdb-80d03917838c16ee0da53a4a8642d5df3bee724e.tar.bz2
Introduce set_force_quit_flag and change type of sync_quit_force_run
At the moment, handle_sigterm() in event-top.c does the following: sync_quit_force_run = 1; set_quit_flag (); This was used several more times in a later patch in this series, so I'm introducing (at Pedro's suggestion) a new function named 'set_force_quit_flag'. It simply sets sync_quit_force_run and also calls set_quit_flag(). I've revised the later patch to call set_force_quit_flag instead. I noticed that sync_quit_force_run is declared as an int but is being used as a bool, so I also changed its type to bool in this commit. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=26761 Approved-By: Pedro Alves <pedro@palves.net>
Diffstat (limited to 'gdb/defs.h')
-rw-r--r--gdb/defs.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/defs.h b/gdb/defs.h
index aba33b8..90748c5 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -171,7 +171,10 @@ extern quit_handler_ftype *quit_handler;
extern void default_quit_handler (void);
/* Flag that function quit should call quit_force. */
-extern volatile int sync_quit_force_run;
+extern volatile bool sync_quit_force_run;
+
+/* Set sync_quit_force_run and also call set_quit_flag(). */
+extern void set_force_quit_flag ();
extern void quit (void);