gdb/testsuite: make test names unique in gdb.python/py-format-string.exp
[deliverable/binutils-gdb.git] / gdb / top.c
index 15fbd6d27e68b4244737a1df0be333378f63298a..3be950796545e206dad1fcf3c9184f3c9e855c24 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -716,9 +716,7 @@ execute_command_to_ui_file (struct ui_file *file, const char *p, int from_tty)
   }
 }
 
-/* Run execute_command for P and FROM_TTY.  Capture its output into the
-   returned string, do not display it to the screen.  BATCH_FLAG will be
-   temporarily set to true.  */
+/* See gdbcmd.h.  */
 
 std::string
 execute_command_to_string (const char *p, int from_tty,
@@ -1391,14 +1389,9 @@ 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.  */
 
-  ui_file_style style;
-  if (interactive)
-    {
-      ui_file_style nstyle = { ui_file_style::MAGENTA, ui_file_style::NONE,
-                              ui_file_style::BOLD };
-      style = nstyle;
-    }
-  fprintf_styled (stream, style, "GNU gdb %s%s\n", PKGVERSION, version);
+  std::string v_str = string_printf ("GNU gdb %s%s", PKGVERSION, version);
+  fprintf_filtered (stream, "%ps\n",
+                   styled_string (version_style.style (), v_str.c_str ()));
 
   /* Second line is a copyright notice.  */
 
This page took 0.024563 seconds and 4 git commands to generate.