From: Simon Marchi <simon.marchi@polymtl.ca>
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@polymtl.ca>
Subject: [PATCH 3/7] gdb: change type of quit_flag to bool
Date: Tue, 23 Apr 2024 09:22:58 -0400 [thread overview]
Message-ID: <20240423132517.2625632-4-simon.marchi@polymtl.ca> (raw)
In-Reply-To: <20240423132517.2625632-1-simon.marchi@polymtl.ca>
Change-Id: I7dc5189ee172e82ef5b2c4a739c011f43a84258b
---
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 6a2a75fe3dc8..8411ec5028a5 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 82d37fb09aea..99e7190d80b6 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;
}
--
2.44.0
next prev parent reply other threads:[~2024-04-23 13:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-23 13:22 [PATCH 0/7] More cleanup of defs.h Simon Marchi
2024-04-23 13:22 ` [PATCH 1/7] gdb: move declarations of check_quit_flag and set_quit_flag to extension.h Simon Marchi
2024-04-25 8:52 ` Alexandra Petlanova Hajkova
2024-04-29 14:46 ` Simon Marchi
2024-04-23 13:22 ` [PATCH 2/7] gdb: change return type of check_quit_flag to bool Simon Marchi
2024-04-27 9:01 ` Alexandra Petlanova Hajkova
2024-04-23 13:22 ` Simon Marchi [this message]
2024-04-23 13:22 ` [PATCH 4/7] gdb: move a bunch of quit-related things to event-top.{c,h} Simon Marchi
2024-04-23 13:23 ` [PATCH 5/7] gdb: move annotation_level declaration/definition to annotate.{h,c} Simon Marchi
2024-04-23 13:23 ` [PATCH 6/7] gdb: remove enum precision_type Simon Marchi
2024-04-23 13:23 ` [PATCH 7/7] gdb: move symbol_file_command declaration to symfile.h Simon Marchi
2024-04-23 15:00 ` [PATCH 0/7] More cleanup of defs.h Tom Tromey
2024-04-23 15:30 ` Simon Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240423132517.2625632-4-simon.marchi@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).