diff options
author | Tom de Vries <tdevries@suse.de> | 2021-11-25 07:49:16 +0100 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2021-11-25 07:49:16 +0100 |
commit | 6ff9675421809af862db5b86d3756ddf4aef568f (patch) | |
tree | bde802e8c32117bb05e220012683003dd473fca9 /gdb/doc | |
parent | 0a4a1c6a3b46731c228431d5bd29181e0d2107c2 (diff) | |
download | gdb-6ff9675421809af862db5b86d3756ddf4aef568f.zip gdb-6ff9675421809af862db5b86d3756ddf4aef568f.tar.gz gdb-6ff9675421809af862db5b86d3756ddf4aef568f.tar.bz2 |
[gdb/cli] Add "set logging enabled", deprecate "set logging on/off"
Before commit 3b6acaee895 "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.
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/gdb.texinfo | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 1b13973..1a944b1 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -1705,17 +1705,15 @@ You may want to save the output of @value{GDBN} commands to a file. There are several commands to control @value{GDBN}'s logging. @table @code -@kindex set logging -@item set logging on -Enable logging. -@item set logging off -Disable logging. +@kindex set logging enabled +@item set logging enabled [on|off] +Enable or disable logging. @cindex logging file name @item set logging file @var{file} Change the name of the current logfile. The default logfile is @file{gdb.txt}. @item set logging overwrite [on|off] By default, @value{GDBN} will append to the logfile. Set @code{overwrite} if -you want @code{set logging on} to overwrite the logfile instead. +you want @code{set logging enabled on} to overwrite the logfile instead. @item set logging redirect [on|off] By default, @value{GDBN} output will go to both the terminal and the logfile. Set @code{redirect} if you want output to go only to the log file. |