[3/6] gdb, cli: pass the argument of a set command to its callback.
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-arm |
success
|
Testing passed
|
Commit Message
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(-)
Comments
>>>>> "Natalia" == Natalia Saiapova <natalia.saiapova@intel.com> writes:
Natalia> This might be useful, if some commands need to have a special case if
Natalia> run w/o arguments.
Do you have an example of this?
I wonder if this is really something we want to allow.
Natalia> diff --git a/gdb/infrun.c b/gdb/infrun.c
Natalia> index e10bde94744..b8feef6bc2d 100644
Natalia> --- a/gdb/infrun.c
Natalia> +++ b/gdb/infrun.c
Natalia> @@ -2385,9 +2385,6 @@ ptid_t
Natalia> user_visible_resume_ptid (int step)
Natalia> {
Natalia> ptid_t resume_ptid;
Natalia> - thread_info *tp = nullptr;
Natalia> - if (inferior_ptid != null_ptid)
Natalia> - tp = inferior_thread ();
This seems to be an unrelated change.
Tom
@@ -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))
{
@@ -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)
{