[RFC,7/8] Style the gdb welcome message

Message ID 20180906211303.11029-8-tom@tromey.com
State New, archived
Headers

Commit Message

Tom Tromey Sept. 6, 2018, 9:13 p.m. UTC
  This changes gdb to style the welcome message that is shown by
default.  The styling is only done interactively.
---
 gdb/top.c | 8 ++++++++
 1 file changed, 8 insertions(+)
  

Patch

diff --git a/gdb/top.c b/gdb/top.c
index 470276e3106..4f4bdef945e 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1281,7 +1281,15 @@  print_gdb_version (struct ui_file *stream, bool interactive)
      program to parse, and is just canonical program name and version
      number, which starts after last space.  */
 
+  if (interactive)
+    {
+      ui_file_style style = { ui_file_style::MAGENTA, ui_file_style::NONE,
+			      ui_file_style::BOLD };
+      set_output_style (stream, style);
+    }
   fprintf_filtered (stream, "GNU gdb %s%s\n", PKGVERSION, version);
+  if (interactive)
+    set_output_style (stream, ui_file_style ());
 
   /* Second line is a copyright notice.  */