diff mbox

[RFC,8/8] Style the "Reading symbols" message

Message ID 20180906211303.11029-9-tom@tromey.com
State New
Headers show

Commit Message

Tom Tromey Sept. 6, 2018, 9:13 p.m. UTC
The "Reading symbols" message does not use ui-out (perhaps it
should?), so this styles it using the low-level API.
---
 gdb/symfile.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/gdb/symfile.c b/gdb/symfile.c
index 20697d9dca2..999e3935622 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -58,6 +58,7 @@ 
 #include "cli/cli-utils.h"
 #include "common/byte-vector.h"
 #include "selftest.h"
+#include "cli/cli-style.h"
 
 #include <sys/types.h>
 #include <fcntl.h>
@@ -1111,7 +1112,11 @@  symbol_file_add_with_addrs (bfd *abfd, const char *name,
 	deprecated_pre_add_symbol_hook (name);
       else
 	{
-	  printf_unfiltered (_("Reading symbols from %s..."), name);
+	  puts_unfiltered (_("Reading symbols from "));
+	  set_output_style (gdb_stdout, file_name_style.style ());
+	  puts_unfiltered (name);
+	  set_output_style (gdb_stdout, ui_file_style ());
+	  puts_unfiltered ("...");
 	  wrap_here ("");
 	  gdb_flush (gdb_stdout);
 	}