binutils-gdb/gdb/cli
Tom de Vries 6ff9675421 [gdb/cli] Add "set logging enabled", deprecate "set logging on/off"
Before commit 3b6acaee89 "Update more calls to add_prefix_cmd" we had the
following output for "show logging file":
...
$ gdb -q -batch -ex "set trace-commands on" \
    -ex "set logging off" \
    -ex "show logging file" \
    -ex "set logging on" \
    -ex "show logging file"
+set logging off
+show logging file
Future logs will be written to gdb.txt.
+set logging on
+show logging file
Currently logging to "gdb.txt".
...

After that commit we have instead:
...
+set logging off
+show logging file
The current logfile is "gdb.txt".
+set logging on
+show logging file
The current logfile is "gdb.txt".
...

Before the commit, whether logging is enabled or not can be deduced from the
output of the command.  After the commit, the message is unified and it's no
longer clear whether logging is enabled or not.

Fix this by:
- adding a new command "show logging enabled"
- adding a corresponding new command "set logging enabled on/off"
- making the commands "set logging on/off" deprecated aliases of the
  "set logging enabled on/off" command.

Update the docs and testsuite to use "set logging enabled".  Mention the new
and deprecated commands in NEWS.

Tested on x86_64-linux.
2021-11-25 07:49:16 +01:00
..
cli-cmds.c gdb/gdbsupport: make xstrprintf and xstrvprintf return a unique_ptr 2021-11-16 17:45:45 +00:00
cli-cmds.h
cli-decode.c gdb/gdbsupport: make xstrprintf and xstrvprintf return a unique_ptr 2021-11-16 17:45:45 +00:00
cli-decode.h
cli-dump.c gdb: change functions returning value contents to use gdb::array_view 2021-10-25 14:51:44 -04:00
cli-interp.c gdb: remove bpstat typedef, rename bpstats to bpstat 2021-11-08 16:39:14 -05:00
cli-interp.h
cli-logging.c [gdb/cli] Add "set logging enabled", deprecate "set logging on/off" 2021-11-25 07:49:16 +01:00
cli-option.c gdbsupport: make gdb_assert_not_reached accept a format string 2021-11-18 11:29:19 -05:00
cli-option.h gdb: make string-like set show commands use std::string variable 2021-10-03 17:53:16 +01:00
cli-script.c
cli-script.h
cli-setshow.c Introduce make_unique_xstrndup 2021-11-05 13:58:48 -06:00
cli-setshow.h
cli-style.c gdb: add add_setshow_prefix_cmd 2021-10-28 10:44:18 -04:00
cli-style.h
cli-utils.c gdb/gdbsupport: make xstrprintf and xstrvprintf return a unique_ptr 2021-11-16 17:45:45 +00:00
cli-utils.h