Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@redhat.com>
To: Klaus Gerlicher <klaus.gerlicher@intel.com>, gdb-patches@sourceware.org
Cc: tom@tromey.com, guinevere@redhat.com, eliz@gnu.org
Subject: Re: [PATCH v8 3/6] gdb, cli: pass the argument of a set command to its callback.
Date: Thu, 23 Jul 2026 10:06:56 +0100	[thread overview]
Message-ID: <87wlumnkgf.fsf@redhat.com> (raw)
In-Reply-To: <87zeziok3t.fsf@redhat.com>

Andrew Burgess <aburgess@redhat.com> writes:

> Klaus Gerlicher <klaus.gerlicher@intel.com> writes:
>
>> 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.
>
> The body of a commit message should ideally not run-on from the title
> line.  This first sentence only makes sense after reading the title.
>
> Anyway, I think there's a bug in this commit.  For the setting types:
> var_uinteger, var_integer, and var_pinteger we call
> parse_cli_var_integer which can modify ARG.  This means you'll not be
> passing through the actual argument of the set command in these cases.
>
> I think the fix is easy enough, just capture the original ARG near the
> start of do_set_command.
>
> I think all the setting types are fine, but if you just capture the
> original ARG value and use that in the 'c->func' call you'll be covered.

It occurred to me that we can easily add some tests for this new
feature. If you checkout gdb/maint-test-settings.c and look for the
"test-settings" you'll see a bunch of dummy maintenance settings.  These
are used by a number of tests, like gdb.base/settings.exp.

Could we not add a set callback to each of these settings that just
prints the value that you're now passing through?  Then the tests, like
settings.exp can be updated to check that we print back the expected
string.

Thanks,
Andrew


  reply	other threads:[~2026-07-23  9:07 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 ` [PATCH v8 3/6] gdb, cli: pass the argument of a set command to its callback Klaus Gerlicher
2026-07-22 20:16   ` Andrew Burgess
2026-07-23  9:06     ` Andrew Burgess [this message]
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=87wlumnkgf.fsf@redhat.com \
    --to=aburgess@redhat.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=guinevere@redhat.com \
    --cc=klaus.gerlicher@intel.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