From: Klaus Gerlicher <klaus.gerlicher@intel.com>
To: gdb-patches@sourceware.org
Cc: tom@tromey.com, guinevere@redhat.com, eliz@gnu.org
Subject: [PATCH v8 3/6] gdb, cli: pass the argument of a set command to its callback.
Date: Wed, 22 Jul 2026 10:27:43 +0000 [thread overview]
Message-ID: <20260722102746.131536-4-klaus.gerlicher@intel.com> (raw)
In-Reply-To: <20260722102746.131536-1-klaus.gerlicher@intel.com>
From: Natalia Saiapova <natalia.saiapova@intel.com>
This might be useful, if some commands need to have a special case if
run w/o arguments.
I am going to use it in
gdb: refine commands to control scheduler locking.
to keep the old behaviour of the
set scheduler-locking step
which should set both
set scheduler-locking step on
set scheduler-locking replay step on
To do this, the set-command needs to detect that it was issued without
arguments and have a special handling for this.
Without the special handling, the command
set scheduler-locking step
would set only
set scheduler-locking step on
Approved-By: Tom Tromey <tom@tromey.com>
---
gdb/cli/cli-setshow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c
index 7688da015de..f1f313a4cd0 100644
--- a/gdb/cli/cli-setshow.c
+++ b/gdb/cli/cli-setshow.c
@@ -455,7 +455,7 @@ do_set_command (const char *arg, int from_tty, struct cmd_list_element *c)
error (_("gdb internal error: bad var_type in do_setshow_command"));
}
- c->func (NULL, from_tty, c);
+ c->func (arg, from_tty, c);
if (notify_command_param_changed_p (option_changed, c))
{
--
2.34.1
Intel Deutschland GmbH
Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany
Tel: +49 89 991 430, www.intel.de
Managing Directors: Harry Demas, Jeffrey Schneiderman, Yin Chong Sorrell
Chairperson of the Supervisory Board: Nicole Lau
Registered Seat: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
next prev parent reply other threads:[~2026-07-22 10:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-22 10:27 [PING PATCH v8 0/6] gdb: refine scheduler locking settings Klaus Gerlicher
2026-07-22 10:27 ` [PATCH v8 1/6] gdb: use schedlock_applies in user_visible_resume_ptid Klaus Gerlicher
2026-07-22 19:05 ` Andrew Burgess
2026-07-22 10:27 ` [PATCH v8 2/6] gdb, cli: remove left-over code from "set_logging_on" Klaus Gerlicher
2026-07-22 19:13 ` Andrew Burgess
2026-07-22 10:27 ` Klaus Gerlicher [this message]
2026-07-22 20:16 ` [PATCH v8 3/6] gdb, cli: pass the argument of a set command to its callback Andrew Burgess
2026-07-23 9:06 ` Andrew Burgess
2026-07-22 10:27 ` [PATCH v8 4/6] gdb: change the internal representation of scheduler locking Klaus Gerlicher
2026-07-23 13:48 ` Andrew Burgess
2026-07-22 10:27 ` [PATCH v8 5/6] gdb: refine commands to control " Klaus Gerlicher
2026-07-23 16:39 ` Andrew Burgess
2026-07-24 9:34 ` Andrew Burgess
2026-07-22 10:27 ` [PATCH v8 6/6] gdb: add eval option to lock the scheduler during infcalls Klaus Gerlicher
2026-07-24 9:52 ` Andrew Burgess
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=20260722102746.131536-4-klaus.gerlicher@intel.com \
--to=klaus.gerlicher@intel.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=guinevere@redhat.com \
--cc=tom@tromey.com \
/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