diff options
author | Tom Tromey <tromey@adacore.com> | 2020-12-07 07:33:46 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2020-12-07 07:33:46 -0700 |
commit | a4915e8d6ceac18826d2c832cb1303690dc9f256 (patch) | |
tree | 1ae0c3a4ffe1cf2101d3bc711f530dc82b254566 | |
parent | cd8d2039b01382a49054f2e3e0c9196e2dba5c0c (diff) | |
download | gdb-a4915e8d6ceac18826d2c832cb1303690dc9f256.zip gdb-a4915e8d6ceac18826d2c832cb1303690dc9f256.tar.gz gdb-a4915e8d6ceac18826d2c832cb1303690dc9f256.tar.bz2 |
Use expression completer for "maint print type"
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-07 Tom Tromey <tromey@adacore.com>
* maint.c (_initialize_maint_cmds): Use expression command
completer for "maint print type".
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/maint.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bea7a5b..0634f78 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-12-07 Tom Tromey <tromey@adacore.com> + + * maint.c (_initialize_maint_cmds): Use expression command + completer for "maint print type". + 2020-12-07 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> * completer.c (complete_explicit_location): Also add keywords diff --git a/gdb/maint.c b/gdb/maint.c index e8cdda3..5631960 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."), |