From: Natalia Saiapova <natalia.saiapova@intel.com>
To: gdb-patches@sourceware.org
Cc: tankut.baris.aktemur@intel.com
Subject: [PATCH 3/6] gdb, cli: pass the argument of a set command to its callback.
Date: Fri, 29 Dec 2023 10:41:59 +0000 [thread overview]
Message-ID: <20231229104202.7878-4-natalia.saiapova@intel.com> (raw)
In-Reply-To: <20231229104202.7878-1-natalia.saiapova@intel.com>
This might be useful, if some commands need to have a special case if
run w/o arguments.
---
gdb/cli/cli-setshow.c | 2 +-
gdb/infrun.c | 3 ---
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c
index 11f93068b68..158425a9df1 100644
--- a/gdb/cli/cli-setshow.c
+++ b/gdb/cli/cli-setshow.c
@@ -448,7 +448,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))
{
diff --git a/gdb/infrun.c b/gdb/infrun.c
index e10bde94744..b8feef6bc2d 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -2385,9 +2385,6 @@ ptid_t
user_visible_resume_ptid (int step)
{
ptid_t resume_ptid;
- thread_info *tp = nullptr;
- if (inferior_ptid != null_ptid)
- tp = inferior_thread ();
if (non_stop)
{
--
2.25.1
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
next prev parent reply other threads:[~2023-12-29 10:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-29 10:41 [PATCH 0/6] Refinement of scheduler-locking settings Natalia Saiapova
2023-12-29 10:41 ` [PATCH 1/6] gdb: use schedlock_applies in user_visible_resume_ptid Natalia Saiapova
2024-02-08 18:50 ` Tom Tromey
2023-12-29 10:41 ` [PATCH 2/6] gdb, cli: remove left-over code from "set_logging_on" Natalia Saiapova
2024-02-08 18:50 ` Tom Tromey
2023-12-29 10:41 ` Natalia Saiapova [this message]
2024-02-08 18:45 ` [PATCH 3/6] gdb, cli: pass the argument of a set command to its callback Tom Tromey
2023-12-29 10:42 ` [PATCH 4/6] gdb: change the internal representation of scheduler locking Natalia Saiapova
2023-12-29 11:49 ` Eli Zaretskii
2023-12-29 10:42 ` [PATCH 5/6] gdb: add commands to control " Natalia Saiapova
2023-12-29 12:03 ` Eli Zaretskii
2023-12-29 10:42 ` [PATCH 6/6] gdb: add eval option to lock the scheduler during infcalls Natalia Saiapova
2023-12-29 12:06 ` Eli Zaretskii
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=20231229104202.7878-4-natalia.saiapova@intel.com \
--to=natalia.saiapova@intel.com \
--cc=gdb-patches@sourceware.org \
--cc=tankut.baris.aktemur@intel.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).