]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/exec.c
Unify gdb printf functions
[thirdparty/binutils-gdb.git] / gdb / exec.c
index caf790a0dfb3ec2671abfae840692329d20951a6..0ac4940c69b428507cb1dd8e271b53eeb2013a5c 100644 (file)
@@ -103,9 +103,9 @@ static void
 show_exec_file_mismatch_command (struct ui_file *file, int from_tty,
                                 struct cmd_list_element *c, const char *value)
 {
-  fprintf_filtered (file,
-                   _("exec-file-mismatch handling is currently \"%s\".\n"),
-                   exec_file_mismatch_names[exec_file_mismatch_mode]);
+  gdb_printf (file,
+             _("exec-file-mismatch handling is currently \"%s\".\n"),
+             exec_file_mismatch_names[exec_file_mismatch_mode]);
 }
 
 /* Set command.  Change the setting for range checking.  */
@@ -136,8 +136,8 @@ static void
 show_write_files (struct ui_file *file, int from_tty,
                  struct cmd_list_element *c, const char *value)
 {
-  fprintf_filtered (file, _("Writing into executable and core files is %s.\n"),
-                   value);
+  gdb_printf (file, _("Writing into executable and core files is %s.\n"),
+             value);
 }
 
 
@@ -379,7 +379,7 @@ exec_file_attach (const char *filename, int from_tty)
   if (!filename)
     {
       if (from_tty)
-       printf_filtered (_("No executable file now.\n"));
+       gdb_printf (_("No executable file now.\n"));
 
       set_gdbarch_from_file (NULL);
     }
@@ -906,11 +906,11 @@ print_section_info (const target_section_table *t, bfd *abfd)
   /* FIXME: 16 is not wide enough when gdbarch_addr_bit > 64.  */
   int wid = gdbarch_addr_bit (gdbarch) <= 32 ? 8 : 16;
 
-  printf_filtered ("\t`%ps', ",
-                  styled_string (file_name_style.style (),
-                                 bfd_get_filename (abfd)));
+  gdb_printf ("\t`%ps', ",
+             styled_string (file_name_style.style (),
+                            bfd_get_filename (abfd)));
   gdb_stdout->wrap_here (8);
-  printf_filtered (_("file type %s.\n"), bfd_get_target (abfd));
+  gdb_printf (_("file type %s.\n"), bfd_get_target (abfd));
   if (abfd == current_program_space->exec_bfd ())
     {
       /* gcc-3.4 does not like the initialization in
@@ -944,16 +944,16 @@ print_section_info (const target_section_table *t, bfd *abfd)
       entry_point = gdbarch_addr_bits_remove (gdbarch, 
                                              bfd_get_start_address (abfd) 
                                                + displacement);
-      printf_filtered (_("\tEntry point: %s\n"),
-                      paddress (gdbarch, entry_point));
+      gdb_printf (_("\tEntry point: %s\n"),
+                 paddress (gdbarch, entry_point));
     }
   for (const target_section &p : *t)
     {
       struct bfd_section *psect = p.the_bfd_section;
       bfd *pbfd = psect->owner;
 
-      printf_filtered ("\t%s", hex_string_custom (p.addr, wid));
-      printf_filtered (" - %s", hex_string_custom (p.endaddr, wid));
+      gdb_printf ("\t%s", hex_string_custom (p.addr, wid));
+      gdb_printf (" - %s", hex_string_custom (p.endaddr, wid));
 
       /* FIXME: A format of "08l" is not wide enough for file offsets
         larger than 4GB.  OTOH, making it "016l" isn't desirable either
@@ -962,14 +962,14 @@ print_section_info (const target_section_table *t, bfd *abfd)
         format string accordingly.  */
       /* FIXME: i18n: Need to rewrite this sentence.  */
       if (info_verbose)
-       printf_filtered (" @ %s",
-                        hex_string_custom (psect->filepos, 8));
-      printf_filtered (" is %s", bfd_section_name (psect));
+       gdb_printf (" @ %s",
+                   hex_string_custom (psect->filepos, 8));
+      gdb_printf (" is %s", bfd_section_name (psect));
       if (pbfd != abfd)
-       printf_filtered (" in %ps",
-                        styled_string (file_name_style.style (),
-                                       bfd_get_filename (pbfd)));
-      printf_filtered ("\n");
+       gdb_printf (" in %ps",
+                   styled_string (file_name_style.style (),
+                                  bfd_get_filename (pbfd)));
+      gdb_printf ("\n");
     }
 }