+2019-12-04 Tom Tromey <tom@tromey.com>
+
+ * valprint.c (val_print_string): Use metadata_style.
+ * go-valprint.c (print_go_string): Use metadata style.
+ * p-valprint.c (pascal_object_print_static_field): Use metadata
+ style.
+ * cp-valprint.c (cp_print_static_field): Use metadata style.
+
2019-12-04 Andrew Burgess <andrew.burgess@embecosm.com>
Chris January <chris.january@arm.com>
{
if (value_address (val) == first_dont_print[i])
{
- fputs_filtered ("<same as static member of an already"
- " seen type>",
- stream);
+ fputs_styled (_("<same as static member of an already"
+ " seen type>"),
+ metadata_style.style (), stream);
return;
}
}
{
if (target_type == first_dont_print[i])
{
- fputs_filtered ("<same as static member of an already"
- " seen type>",
- stream);
+ fputs_styled (_("<same as static member of an already"
+ " seen type>"),
+ metadata_style.style (), stream);
return;
}
}
#include "go-lang.h"
#include "c-lang.h"
#include "valprint.h"
+#include "cli/cli-style.h"
/* Print a Go string.
if (length < 0)
{
- fputs_filtered (_("<invalid length: "), stream);
- fputs_filtered (plongest (addr), stream);
- fputs_filtered (">", stream);
+ printf_filtered (_("<invalid length: %ps>"),
+ styled_string (metadata_style.style (),
+ plongest (addr)));
return;
}
{
if (value_address (val) == first_dont_print[i])
{
- fputs_filtered ("\
-<same as static member of an already seen type>",
- stream);
+ fputs_styled (_("\
+<same as static member of an already seen type>"),
+ metadata_style.style (), stream);
return;
}
}
{
std::string str = memory_error_message (TARGET_XFER_E_IO, gdbarch, addr);
- fprintf_filtered (stream, "<error: ");
- fputs_filtered (str.c_str (), stream);
- fprintf_filtered (stream, ">");
+ fprintf_filtered (stream, _("<error: %ps>"),
+ styled_string (metadata_style.style (),
+ str.c_str ()));
}
return (bytes_read / width);