gdb: Use add_setshow_zuinteger_unlimited_cmd in remote.c
authorAndrew Burgess <andrew.burgess@embecosm.com>
Mon, 2 Jul 2018 21:28:22 +0000 (22:28 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Mon, 9 Jul 2018 17:07:01 +0000 (18:07 +0100)
commit055303e28f70880f7b2c3e44df0ba7646fc85cf8
treee20d45709411b0a546e6a53a1a77f699b3d7ae95
parent2af4d0d938d76e96ccb862a23d05862154262de9
gdb: Use add_setshow_zuinteger_unlimited_cmd in remote.c

Switch to use add_setshow_zuinteger_unlimited_cmd for some of the
control variables in remote.c.  The variables
hardware-watchpoint-limit, hardware-breakpoint-limit, and
hardware-watchpoint-length-limit are all changed.  For example, a user
will now see this:

    (gdb) show remote hardware-breakpoint-limit
    The maximum number of target hardware breakpoints is unlimited.

Instead of this:

    (gdb) show remote hardware-breakpoint-limit
    The maximum number of target hardware breakpoints is -1.

And can do this:

    (gdb) set remote hardware-breakpoint-limit unlimited

However, previously any negative value implied "unlimited", now only
-1, or the text "unlimited" can be used for unlimited.  Any other
negative value will give an error about invalid input.  This is a
small change in the user interface, but, hopefully, this will not
cause too many problems.

I've also added show functions for these three variables to allow for
internationalisation.

gdb/ChangeLog:

* remote.c (show_hardware_watchpoint_limit): New function.
(show_hardware_watchpoint_length_limit): New function.
(show_hardware_breakpoint_limit): New function.
(_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
where appropriate, update help text.

gdb/doc/ChangeLog:

* gdb.texinfo (Remote Configuration): Update descriptions for
set/show of hardware-watchpoint-limit, hardware-breakpoint-limit,
and hardware-watchpoint-length-limit variables.
gdb/ChangeLog
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo
gdb/remote.c