aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/style-logging.exp
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2021-11-25 07:49:16 +0100
committerTom de Vries <tdevries@suse.de>2021-11-25 07:49:16 +0100
commit6ff9675421809af862db5b86d3756ddf4aef568f (patch)
treebde802e8c32117bb05e220012683003dd473fca9 /gdb/testsuite/gdb.base/style-logging.exp
parent0a4a1c6a3b46731c228431d5bd29181e0d2107c2 (diff)
downloadgdb-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/testsuite/gdb.base/style-logging.exp')
-rw-r--r--gdb/testsuite/gdb.base/style-logging.exp4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.base/style-logging.exp b/gdb/testsuite/gdb.base/style-logging.exp
index cd0c99a..626b2f0 100644
--- a/gdb/testsuite/gdb.base/style-logging.exp
+++ b/gdb/testsuite/gdb.base/style-logging.exp
@@ -46,7 +46,7 @@ save_vars { env(TERM) } {
gdb_test_no_output "set logging file $log_name" \
"set logging filename"
gdb_test_no_output "set logging overwrite on"
- gdb_test "set logging on" "Copying output to .*"
+ gdb_test "set logging enabled on" "Copying output to .*"
set main_expr [style main function]
set base_file_expr [style ".*style\\.c" file]
@@ -55,7 +55,7 @@ save_vars { env(TERM) } {
gdb_test "frame" \
"$main_expr.*$arg_expr.*$arg_expr.*$file_expr.*"
- gdb_test "set logging off" "Done logging to .*"
+ gdb_test "set logging enabled off" "Done logging to .*"
set fd [open $log_name]
set data [read -nonewline $fd]