summaryrefslogtreecommitdiff
path: root/gdb/go-valprint.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/go-valprint.c')
-rw-r--r--gdb/go-valprint.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/go-valprint.c b/gdb/go-valprint.c
index eda40f8ed8b..64761b98221 100644
--- a/gdb/go-valprint.c
+++ b/gdb/go-valprint.c
@@ -29,6 +29,7 @@
#include "go-lang.h"
#include "c-lang.h"
#include "valprint.h"
+#include "cli/cli-style.h"
/* Print a Go string.
@@ -71,9 +72,9 @@ print_go_string (struct type *type,
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;
}