public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb: change type of quit_flag to bool
@ 2024-04-23 15:28 Simon Marchi
  0 siblings, 0 replies; only message in thread
From: Simon Marchi @ 2024-04-23 15:28 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4111db1af3ac9be50a49ad69b255a6cd4198037b

commit 4111db1af3ac9be50a49ad69b255a6cd4198037b
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date:   Tue Apr 23 09:22:58 2024 -0400

    gdb: change type of quit_flag to bool
    
    Change-Id: I7dc5189ee172e82ef5b2c4a739c011f43a84258b
    Approved-By: Tom Tromey <tom@tromey.com>

Diff:
---
 gdb/event-top.c | 4 ++--
 gdb/extension.c | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/gdb/event-top.c b/gdb/event-top.c
index 6a2a75fe3dc..8411ec5028a 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -1113,7 +1113,7 @@ handle_sigint (int sig)
 
   /* We could be running in a loop reading in symfiles or something so
      it may be quite a while before we get back to the event loop.  So
-     set quit_flag to 1 here.  Then if QUIT is called before we get to
+     set quit_flag to true here.  Then if QUIT is called before we get to
      the event loop, we will unwind as expected.  */
   set_quit_flag ();
 
@@ -1193,7 +1193,7 @@ handle_sigterm (int sig)
 void
 async_request_quit (gdb_client_data arg)
 {
-  /* If the quit_flag has gotten reset back to 0 by the time we get
+  /* If the quit_flag has gotten reset back to false 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.  */
diff --git a/gdb/extension.c b/gdb/extension.c
index 82d37fb09ae..99e7190d80b 100644
--- a/gdb/extension.c
+++ b/gdb/extension.c
@@ -663,7 +663,7 @@ static std::recursive_mutex ext_lang_mutex;
 /* This flag tracks quit requests when we haven't called out to an
    extension language.  it also holds quit requests when we transition to
    an extension language that doesn't have cooperative SIGINT handling.  */
-static int quit_flag;
+static bool quit_flag;
 
 /* The current extension language we've called out to, or
    extension_language_gdb if there isn't one.
@@ -877,7 +877,7 @@ set_quit_flag ()
     active_ext_lang->ops->set_quit_flag (active_ext_lang);
   else
     {
-      quit_flag = 1;
+      quit_flag = true;
 
       /* Now wake up the event loop, or any interruptible_select.  Do
 	 this after setting the flag, because signals on Windows
@@ -914,7 +914,7 @@ check_quit_flag ()
 	 interruptible_select.  The caller handles the quit
 	 request.  */
       quit_serial_event_clear ();
-      quit_flag = 0;
+      quit_flag = false;
       result = true;
     }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-23 15:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-23 15:28 [binutils-gdb] gdb: change type of quit_flag to bool Simon Marchi

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).