@@ -1349,7 +1349,9 @@ write_object_renaming (struct parser_state *par_state,
block_symbol sym_info = ada_lookup_encoded_symbol (name, orig_left_context,
SEARCH_VFT);
if (sym_info.symbol == NULL)
- error (_("Could not find renamed variable: %s"), ada_decode (name).c_str ());
+ error (_("Could not find renamed variable: %ps"),
+ styled_string (variable_name_style.style (),
+ ada_decode (name).c_str ()));
else if (sym_info.symbol->loc_class () == LOC_TYPEDEF)
/* We have a renaming of an old-style renaming symbol. Don't
trust the block information. */
@@ -52,8 +52,9 @@ get_ulongest (const char **pp, int trailer)
std::string varname (start, p - start);
if (!get_internalvar_integer (lookup_internalvar (varname.c_str ()),
&retval))
- error (_("Convenience variable $%s does not have integer value."),
- varname.c_str ());
+ error (_("Convenience variable %p[$%s%p] does not have integer value."),
+ variable_name_style.style ().ptr (),
+ varname.c_str (), nullptr);
}
}
else
@@ -41,6 +41,7 @@
#include "expop.h"
#include "c-exp.h"
#include "inferior.h"
+#include "cli/cli-style.h"
/* Parse the string EXP as a C expression, evaluate it,
@@ -1119,7 +1120,8 @@ eval_op_func_static_var (struct type *expect_type, struct expression *exp,
struct block_symbol sym = lookup_symbol (var, blk, SEARCH_VAR_DOMAIN,
nullptr);
if (sym.symbol == NULL)
- error (_("No symbol \"%s\" in specified context."), var);
+ error (_("No symbol \"%ps\" in specified context."),
+ styled_string (variable_name_style.style (), var));
return evaluate_var_value (noside, sym.block, sym.symbol);
}
@@ -32,6 +32,7 @@
#include "block.h"
#include "objfiles.h"
#include "language.h"
+#include "cli/cli-style.h"
/* Basic byte-swapping routines. All 'extract' functions return a
host-format integer from a target-format integer at ADDR which is
@@ -299,7 +300,8 @@ language_defn::read_var_value (struct symbol *var,
if (sym_need == SYMBOL_NEEDS_FRAME)
gdb_assert (frame != NULL);
else if (sym_need == SYMBOL_NEEDS_REGISTERS && !target_has_registers ())
- error (_("Cannot read `%s' without registers"), var->print_name ());
+ error (_("Cannot read `%ps' without registers"),
+ styled_string (variable_name_style.style (), var->print_name ()));
if (frame != NULL)
frame = get_hosting_frame (var, var_block, frame);
@@ -40,6 +40,7 @@
#include "extension.h"
#include "gdbsupport/byte-vector.h"
#include "typeprint.h"
+#include "cli/cli-style.h"
/* Local functions. */
@@ -3985,8 +3986,9 @@ value_of_this (const struct language_defn *lang)
sym = lookup_language_this (lang, b);
if (sym.symbol == NULL)
- error (_("current stack frame does not contain a variable named `%s'"),
- lang->name_of_this ());
+ error (_("current stack frame does not contain a variable named `%ps'"),
+ styled_string (variable_name_style.style (),
+ lang->name_of_this ()));
return read_var_value (sym.symbol, sym.block, frame);
}