Use filtered output in files_info implementations

This changes the implementations of the target files_info method to
use filtered output.  This makes sense because the sole caller of this
method is an ordinary command (info_program_command).  This patch
changes this command to use filtered output as well.
This commit is contained in:
Tom Tromey 2021-12-26 18:14:39 -07:00
parent ec2770563a
commit a037434531
5 changed files with 15 additions and 15 deletions

View file

@ -663,7 +663,7 @@ static cmdline_t child_cmd; /* Parsed child's command line kept here. */
void
go32_nat_target::files_info ()
{
printf_unfiltered ("You are running a DJGPP V2 program.\n");
printf_filtered ("You are running a DJGPP V2 program.\n");
}
void

View file

@ -656,10 +656,10 @@ nto_procfs_target::files_info ()
{
struct inferior *inf = current_inferior ();
printf_unfiltered ("\tUsing the running image of %s %s via %s.\n",
inf->attach_flag ? "attached" : "child",
target_pid_to_str (inferior_ptid).c_str (),
(nodestr != NULL) ? nodestr : "local node");
printf_filtered ("\tUsing the running image of %s %s via %s.\n",
inf->attach_flag ? "attached" : "child",
target_pid_to_str (inferior_ptid).c_str (),
(nodestr != NULL) ? nodestr : "local node");
}
/* Target to_pid_to_exec_file implementation. */

View file

@ -1114,8 +1114,8 @@ gdbsim_target::files_info ()
if (current_program_space->exec_bfd ())
{
fprintf_unfiltered (gdb_stdlog, "\tAttached to %s running program %s\n",
target_shortname (), file);
printf_filtered ("\tAttached to %s running program %s\n",
target_shortname (), file);
sim_info (sim_data->gdbsim_desc, 0);
}
}

View file

@ -2444,8 +2444,8 @@ info_target_command (const char *args, int from_tty)
if (current_program_space->symfile_object_file != NULL)
{
objfile *objf = current_program_space->symfile_object_file;
printf_unfiltered (_("Symbols from \"%s\".\n"),
objfile_name (objf));
printf_filtered (_("Symbols from \"%s\".\n"),
objfile_name (objf));
}
for (target_ops *t = current_inferior ()->top_target ();
@ -2458,9 +2458,9 @@ info_target_command (const char *args, int from_tty)
if ((int) (t->stratum ()) <= (int) dummy_stratum)
continue;
if (has_all_mem)
printf_unfiltered (_("\tWhile running this, "
"GDB does not access memory from...\n"));
printf_unfiltered ("%s:\n", t->longname ());
printf_filtered (_("\tWhile running this, "
"GDB does not access memory from...\n"));
printf_filtered ("%s:\n", t->longname ());
t->files_info ();
has_all_mem = t->has_all_memory ();
}

View file

@ -2090,9 +2090,9 @@ windows_nat_target::files_info ()
{
struct inferior *inf = current_inferior ();
printf_unfiltered ("\tUsing the running image of %s %s.\n",
inf->attach_flag ? "attached" : "child",
target_pid_to_str (inferior_ptid).c_str ());
printf_filtered ("\tUsing the running image of %s %s.\n",
inf->attach_flag ? "attached" : "child",
target_pid_to_str (inferior_ptid).c_str ());
}
/* Modify CreateProcess parameters for use of a new separate console.