[PATCH 4/5] gdb: add "info index-cache stats", deprecate "show index-cache stats"

Tom Tromey tom@tromey.com
Thu Nov 4 18:33:49 GMT 2021


>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:

Simon> The "show index-cache stats" command is used to show some statistics
Simon> about the index-cache usage.  I believe this is not a good use of a show
Simon> command, as it is not a setting.

I think "show" is generally used for any information about the debugger,
not just settings.

A long, long time ago there was some effort to split 'info' and 'show'
this way.  The details of this discussion are long lost, as far as I
know, but the outcome lives on in the help and manual:

'info'
     This command (abbreviated 'i') is for describing the state of your
     program.

'show'
     In contrast to 'info', 'show' is for describing the state of GDB
     itself.  You can change most of the things you can 'show', by using [...]

So I tend to think "show index-cache stats" is more correct.

Tom


More information about the Gdb-patches mailing list