struct cmd_list_element *c, const char *value)
{
if (logging_enabled)
- printf_unfiltered (_("Logging is enabled.\n"));
+ fprintf_unfiltered (file, _("Logging is enabled.\n"));
else
- printf_unfiltered (_("Logging is disabled.\n"));
+ fprintf_unfiltered (file, _("Logging is disabled.\n"));
}
void _initialize_cli_logging ();
show_debuginfod_enabled (ui_file *file, int from_tty, cmd_list_element *cmd,
const char *value)
{
- printf_unfiltered (_("Debuginfod functionality is currently set to "
- "\"%s\".\n"), debuginfod_enabled);
+ fprintf_unfiltered (file,
+ _("Debuginfod functionality is currently set to "
+ "\"%s\".\n"), debuginfod_enabled);
}
/* Set callback for "set debuginfod urls". */
show_exec_file_mismatch_command (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (gdb_stdout,
+ fprintf_filtered (file,
_("exec-file-mismatch handling is currently \"%s\".\n"),
exec_file_mismatch_names[exec_file_mismatch_mode]);
}
directly. */
const std::string &inferior_tty = current_inferior ()->tty ();
- fprintf_filtered (gdb_stdout,
+ fprintf_filtered (file,
_("Terminal for future runs of program being debugged "
"is \"%s\".\n"), inferior_tty.c_str ());
}
const std::string &cwd = current_inferior ()->cwd ();
if (cwd.empty ())
- fprintf_filtered (gdb_stdout,
+ fprintf_filtered (file,
_("\
You have not set the inferior's current working directory.\n\
The inferior will inherit GDB's cwd if native debugging, or the remote\n\
server's cwd if remote debugging.\n"));
else
- fprintf_filtered (gdb_stdout,
+ fprintf_filtered (file,
_("Current working directory that will be used "
"when starting the inferior is \"%s\".\n"),
cwd.c_str ());
enum language flang; /* The language of the frame. */
if (language_mode == language_mode_auto)
- fprintf_filtered (gdb_stdout,
+ fprintf_filtered (file,
_("The current source language is "
"\"auto; currently %s\".\n"),
current_language->name ());
else
- fprintf_filtered (gdb_stdout,
+ fprintf_filtered (file,
_("The current source language is \"%s\".\n"),
current_language->name ());
if (flang != language_unknown
&& language_mode == language_mode_manual
&& current_language->la_language != flang)
- printf_filtered ("%s\n", _(lang_frame_mismatch_warn));
+ fprintf_filtered (file, "%s\n", _(lang_frame_mismatch_warn));
}
}
"Unrecognized range check setting.");
}
- fprintf_filtered (gdb_stdout,
+ fprintf_filtered (file,
_("Range checking is \"auto; currently %s\".\n"),
tmp);
}
else
- fprintf_filtered (gdb_stdout, _("Range checking is \"%s\".\n"),
+ fprintf_filtered (file, _("Range checking is \"%s\".\n"),
value);
if (range_check == range_check_warn
"Unrecognized case-sensitive setting.");
}
- fprintf_filtered (gdb_stdout,
+ fprintf_filtered (file,
_("Case sensitivity in "
"name search is \"auto; currently %s\".\n"),
tmp);
}
else
- fprintf_filtered (gdb_stdout,
+ fprintf_filtered (file,
_("Case sensitivity in name search is \"%s\".\n"),
value);
switch (mask_address_var)
{
case AUTO_BOOLEAN_TRUE:
- printf_filtered ("The 32 bit mips address mask is enabled\n");
+ fprintf_filtered (file, "The 32 bit mips address mask is enabled\n");
break;
case AUTO_BOOLEAN_FALSE:
- printf_filtered ("The 32 bit mips address mask is disabled\n");
+ fprintf_filtered (file, "The 32 bit mips address mask is disabled\n");
break;
case AUTO_BOOLEAN_AUTO:
- printf_filtered
- ("The 32 bit address mask is set automatically. Currently %s\n",
+ fprintf_filtered
+ (file,
+ "The 32 bit address mask is set automatically. Currently %s\n",
mips_mask_address_p (tdep) ? "enabled" : "disabled");
break;
default:
cmd_show_replay_memory_access (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (gdb_stdout, _("Replay memory access is %s.\n"),
+ fprintf_filtered (file, _("Replay memory access is %s.\n"),
replay_memory_access);
}
struct packet_config;
-static void show_packet_config_cmd (struct packet_config *config);
-
static void show_remote_protocol_packet_cmd (struct ui_file *file,
int from_tty,
struct cmd_list_element *c,
static enum packet_support packet_support (int packet);
static void
-show_packet_config_cmd (struct packet_config *config)
+show_packet_config_cmd (ui_file *file, struct packet_config *config)
{
const char *support = "internal-error";
switch (config->detect)
{
case AUTO_BOOLEAN_AUTO:
- printf_filtered (_("Support for the `%s' packet "
- "is auto-detected, currently %s.\n"),
- config->name, support);
+ fprintf_filtered (file,
+ _("Support for the `%s' packet "
+ "is auto-detected, currently %s.\n"),
+ config->name, support);
break;
case AUTO_BOOLEAN_TRUE:
case AUTO_BOOLEAN_FALSE:
- printf_filtered (_("Support for the `%s' packet is currently %s.\n"),
- config->name, support);
+ fprintf_filtered (file,
+ _("Support for the `%s' packet is currently %s.\n"),
+ config->name, support);
break;
}
}
{
if (c == packet->show_cmd)
{
- show_packet_config_cmd (packet);
+ show_packet_config_cmd (file, packet);
return;
}
}
for (i = 0; i < NR_Z_PACKET_TYPES; i++)
{
- show_packet_config_cmd (&remote_protocol_packets[PACKET_Z0 + i]);
+ show_packet_config_cmd (file, &remote_protocol_packets[PACKET_Z0 + i]);
}
}
function. */
static void
-show_directories_1 (char *ignore, int from_tty)
+show_directories_1 (ui_file *file, char *ignore, int from_tty)
{
- puts_filtered ("Source directories searched: ");
- puts_filtered (source_path.c_str ());
- puts_filtered ("\n");
+ fputs_filtered ("Source directories searched: ", file);
+ fputs_filtered (source_path.c_str (), file);
+ fputs_filtered ("\n", file);
}
/* Handler for "show directories" command. */
show_directories_command (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- show_directories_1 (NULL, from_tty);
+ show_directories_1 (file, NULL, from_tty);
}
/* See source.h. */
gdb::observers::command_param_changed.notify ("directories",
source_path.c_str ());
if (from_tty)
- show_directories_1 ((char *) 0, from_tty);
+ show_directories_1 (gdb_stdout, (char *) 0, from_tty);
}
}
value = get_tdesc_info (current_inferior ())->filename.data ();
if (value != NULL && *value != '\0')
- printf_filtered (_("The target description will be read from \"%s\".\n"),
- value);
+ fprintf_filtered (file,
+ _("The target description will be read from \"%s\".\n"),
+ value);
else
- printf_filtered (_("The target description will be "
- "read from the target.\n"));
+ fprintf_filtered (file,
+ _("The target description will be "
+ "read from the target.\n"));
}
static void
tui_show_tab_width (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (gdb_stdout, _("TUI tab width is %s spaces.\n"), value);
+ fprintf_filtered (file, _("TUI tab width is %s spaces.\n"), value);
}
tui_show_compact_source (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- printf_filtered (_("TUI source window compactness is %s.\n"), value);
+ fprintf_filtered (file, _("TUI source window compactness is %s.\n"), value);
}
/* Set the tab width of the specified window. */