aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2025-01-13 04:05:10 -0700
committerTom Tromey <tom@tromey.com>2025-01-14 15:39:43 -0700
commitfc0a39f4076ea87396a91a264896e7e91c3f9d61 (patch)
tree0da39b3a03958fdcf13a36ac49440f736eacc952 /gdb/cli
parente76d66a53ee9ef0a70fdb44a3150518fcc8086ea (diff)
downloadbinutils-fc0a39f4076ea87396a91a264896e7e91c3f9d61.zip
binutils-fc0a39f4076ea87396a91a264896e7e91c3f9d61.tar.gz
binutils-fc0a39f4076ea87396a91a264896e7e91c3f9d61.tar.bz2
Use filename style in "show" commands
I found a few filename-related "show" commands that do not use the filename style when displaying the file. This patch fixes the oversight. Approved-By: Andrew Burgess <aburgess@redhat.com>
Diffstat (limited to 'gdb/cli')
-rw-r--r--gdb/cli/cli-setshow.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c
index a8f22c9..73b5225 100644
--- a/gdb/cli/cli-setshow.c
+++ b/gdb/cli/cli-setshow.c
@@ -27,6 +27,7 @@
#include "cli/cli-decode.h"
#include "cli/cli-cmds.h"
#include "cli/cli-setshow.h"
+#include "cli/cli-style.h"
#include "cli/cli-utils.h"
/* Return true if the change of command parameter should be notified. */
@@ -137,12 +138,16 @@ deprecated_show_value_hack (struct ui_file *ignore_file,
{
case var_string:
case var_string_noescape:
- case var_optional_filename:
- case var_filename:
case var_enum:
gdb_printf ((" is \"%s\".\n"), value);
break;
+ case var_optional_filename:
+ case var_filename:
+ gdb_printf ((" is \"%ps\".\n"),
+ styled_string (file_name_style.style (), value));
+ break;
+
default:
gdb_printf ((" is %s.\n"), value);
break;