mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-28 07:08:01 +08:00
Consistently Use ui_file parameter to show callbacks
I happened to notice that one "show" callback was printing to gdb_stdout rather than to the passed-in ui_file parameter. I went through all such callbacks and fixed them to consistently use the ui_file. Regression tested on x86-64 Fedora 34.
This commit is contained in:
@ -114,12 +114,12 @@ show_language_command (struct ui_file *file, int from_tty,
|
||||
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 ());
|
||||
|
||||
@ -132,7 +132,7 @@ show_language_command (struct ui_file *file, int from_tty,
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
@ -220,12 +220,12 @@ show_range_command (struct ui_file *file, int from_tty,
|
||||
"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
|
||||
@ -296,13 +296,13 @@ show_case_command (struct ui_file *file, int from_tty,
|
||||
"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);
|
||||
|
||||
|
Reference in New Issue
Block a user