diff options
author | Andrew Burgess <aburgess@redhat.com> | 2022-01-06 12:53:20 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2022-01-06 15:44:50 +0000 |
commit | 10a85f29c74ab562db622cfc4f58997e859c6ed6 (patch) | |
tree | 30d45dd6c8e647f3a92502c34e61081f9d308d84 /gdb/darwin-nat.c | |
parent | 390abcd903a470c0d3ede640dcb0b7cb62ee9852 (diff) | |
download | gdb-10a85f29c74ab562db622cfc4f58997e859c6ed6.zip gdb-10a85f29c74ab562db622cfc4f58997e859c6ed6.tar.gz gdb-10a85f29c74ab562db622cfc4f58997e859c6ed6.tar.bz2 |
gdb: make use add_setshow_prefix_cmd in gnu-nat.c
In gnu-nat.c we currently implement some set/show prefix commands
"manually", that is, we call add_prefix_cmd, and assign a set and show
function to each prefix command.
These set/show functions print an error indicating that the user
didn't type a complete command.
If we instead switch to using add_setshow_prefix_cmd then we can
delete the set/show functions, GDB provides some default functions,
which give a nice help style summary that lists all of the available
sub-commands, along with a one line summary of what each does.
Though this clearly changes the existing behaviour, I think this
change is acceptable as the new behaviour is more inline with other
set/show prefix commands, and the new behaviour is more informative.
This change will conflict with Tom's change here:
https://sourceware.org/pipermail/gdb-patches/2022-January/184724.html
Where Tom changes the set/show functions that I delete. My suggestion
is that the set/show functions still be deleted even after Tom's
patch (or instead of Tom's patch).
For testing I've build GDB on GNU/Hurd, and manually tested these
functions. I did a grep over the testsuite, and don't believe the
existing error messages are being checked for in any tests.
Diffstat (limited to 'gdb/darwin-nat.c')
0 files changed, 0 insertions, 0 deletions