From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [PATCH 1/2] Boolify suppress_next_print_command_trace
Date: Tue, 02 Jun 2026 11:51:49 -0600 [thread overview]
Message-ID: <20260602-cmd-trace-logging-v1-1-ab7e0fdd476e@adacore.com> (raw)
In-Reply-To: <20260602-cmd-trace-logging-v1-0-ab7e0fdd476e@adacore.com>
This changes suppress_next_print_command_trace to use bool.
---
gdb/cli/cli-script.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index e081f0454b3..b8312f431cb 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -62,7 +62,7 @@ static int control_level;
static int command_nest_depth = 1;
/* This is to prevent certain commands being printed twice. */
-static int suppress_next_print_command_trace = 0;
+static bool suppress_next_print_command_trace = false;
/* Command element for the 'while' command. */
static cmd_list_element *while_cmd_element = nullptr;
@@ -471,7 +471,7 @@ reset_command_nest_depth (void)
command_nest_depth = 1;
/* Just in case. */
- suppress_next_print_command_trace = 0;
+ suppress_next_print_command_trace = false;
}
/* Print the command, prefixed with '+' to represent the call depth.
@@ -490,7 +490,7 @@ print_command_trace (const char *fmt, ...)
if (suppress_next_print_command_trace)
{
- suppress_next_print_command_trace = 0;
+ suppress_next_print_command_trace = false;
return;
}
@@ -720,7 +720,7 @@ execute_control_command (struct command_line *cmd, int from_tty)
enum command_control_type
execute_control_command_untraced (struct command_line *cmd)
{
- suppress_next_print_command_trace = 1;
+ suppress_next_print_command_trace = true;
return execute_control_command (cmd);
}
--
2.54.0
next prev parent reply other threads:[~2026-06-02 17:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-02 17:51 [PATCH 0/2] Send trace-commands output to gdb_stdlog Tom Tromey
2026-06-02 17:51 ` Tom Tromey [this message]
2026-06-02 17:51 ` [PATCH 2/2] Print command trace " Tom Tromey
2026-06-18 16:48 ` [PATCH 0/2] Send trace-commands output " Tom Tromey
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=20260602-cmd-trace-logging-v1-1-ab7e0fdd476e@adacore.com \
--to=tromey@adacore.com \
--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