forked from Imagelibrary/binutils-gdb
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>
This commit is contained in:
@@ -27,6 +27,7 @@
|
|||||||
#include "cli/cli-decode.h"
|
#include "cli/cli-decode.h"
|
||||||
#include "cli/cli-cmds.h"
|
#include "cli/cli-cmds.h"
|
||||||
#include "cli/cli-setshow.h"
|
#include "cli/cli-setshow.h"
|
||||||
|
#include "cli/cli-style.h"
|
||||||
#include "cli/cli-utils.h"
|
#include "cli/cli-utils.h"
|
||||||
|
|
||||||
/* Return true if the change of command parameter should be notified. */
|
/* 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:
|
||||||
case var_string_noescape:
|
case var_string_noescape:
|
||||||
case var_optional_filename:
|
|
||||||
case var_filename:
|
|
||||||
case var_enum:
|
case var_enum:
|
||||||
gdb_printf ((" is \"%s\".\n"), value);
|
gdb_printf ((" is \"%s\".\n"), value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case var_optional_filename:
|
||||||
|
case var_filename:
|
||||||
|
gdb_printf ((" is \"%ps\".\n"),
|
||||||
|
styled_string (file_name_style.style (), value));
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
gdb_printf ((" is %s.\n"), value);
|
gdb_printf ((" is %s.\n"), value);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include "completer.h"
|
#include "completer.h"
|
||||||
#include "readline/tilde.h"
|
#include "readline/tilde.h"
|
||||||
|
#include "cli/cli-style.h"
|
||||||
|
|
||||||
/* Types. */
|
/* Types. */
|
||||||
|
|
||||||
@@ -1230,8 +1231,8 @@ show_tdesc_filename_cmd (struct ui_file *file, int from_tty,
|
|||||||
|
|
||||||
if (value != NULL && *value != '\0')
|
if (value != NULL && *value != '\0')
|
||||||
gdb_printf (file,
|
gdb_printf (file,
|
||||||
_("The target description will be read from \"%s\".\n"),
|
_("The target description will be read from \"%ps\".\n"),
|
||||||
value);
|
styled_string (file_name_style.style (), value));
|
||||||
else
|
else
|
||||||
gdb_printf (file,
|
gdb_printf (file,
|
||||||
_("The target description will be "
|
_("The target description will be "
|
||||||
|
|||||||
Reference in New Issue
Block a user