* [PATCH] Use expression completer for "maint print type"
@ 2020-12-03 14:32 Tom Tromey
2020-12-07 12:51 ` Andrew Burgess
0 siblings, 1 reply; 2+ messages in thread
From: Tom Tromey @ 2020-12-03 14:32 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
I happened to notice that expression completion did not work correctly
for "maint print type". This patch adds the appropriate completer
there.
gdb/ChangeLog
2020-12-03 Tom Tromey <tromey@adacore.com>
* maint.c (_initialize_maint_cmds): Use expression command
completer for "maint print type".
---
gdb/ChangeLog | 5 +++++
gdb/maint.c | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/gdb/maint.c b/gdb/maint.c
index e8cdda3da0e..56319600ed8 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -1193,11 +1193,12 @@ If nonzero, will cause the execution space for each command to be\n\
displayed, following the command's output."),
&maintenancelist);
- add_cmd ("type", class_maintenance, maintenance_print_type, _("\
+ cmd = add_cmd ("type", class_maintenance, maintenance_print_type, _("\
Print a type chain for a given symbol.\n\
For each node in a type chain, print the raw data for each member of\n\
the type structure, and the interpretation of the data."),
&maintenanceprintlist);
+ set_cmd_completer (cmd, expression_completer);
add_cmd ("statistics", class_maintenance, maintenance_print_statistics,
_("Print statistics about internal gdb state."),
--
2.26.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Use expression completer for "maint print type"
2020-12-03 14:32 [PATCH] Use expression completer for "maint print type" Tom Tromey
@ 2020-12-07 12:51 ` Andrew Burgess
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Burgess @ 2020-12-07 12:51 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
* Tom Tromey <tromey@adacore.com> [2020-12-03 07:32:26 -0700]:
> I happened to notice that expression completion did not work correctly
> for "maint print type". This patch adds the appropriate completer
> there.
>
> gdb/ChangeLog
> 2020-12-03 Tom Tromey <tromey@adacore.com>
>
> * maint.c (_initialize_maint_cmds): Use expression command
> completer for "maint print type".
LGTM.
Thanks,
Andrew
> ---
> gdb/ChangeLog | 5 +++++
> gdb/maint.c | 3 ++-
> 2 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/gdb/maint.c b/gdb/maint.c
> index e8cdda3da0e..56319600ed8 100644
> --- a/gdb/maint.c
> +++ b/gdb/maint.c
> @@ -1193,11 +1193,12 @@ If nonzero, will cause the execution space for each command to be\n\
> displayed, following the command's output."),
> &maintenancelist);
>
> - add_cmd ("type", class_maintenance, maintenance_print_type, _("\
> + cmd = add_cmd ("type", class_maintenance, maintenance_print_type, _("\
> Print a type chain for a given symbol.\n\
> For each node in a type chain, print the raw data for each member of\n\
> the type structure, and the interpretation of the data."),
> &maintenanceprintlist);
> + set_cmd_completer (cmd, expression_completer);
>
> add_cmd ("statistics", class_maintenance, maintenance_print_statistics,
> _("Print statistics about internal gdb state."),
> --
> 2.26.2
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-07 12:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-03 14:32 [PATCH] Use expression completer for "maint print type" Tom Tromey
2020-12-07 12:51 ` Andrew Burgess
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).