diff options
author | Tom Tromey <tom@tromey.com> | 2021-12-29 11:05:51 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2021-12-29 11:08:14 -0700 |
commit | 3de0d96078193276795b9bdf72a25b77b60d8337 (patch) | |
tree | 6c730b8fdddc60a05cae34a7404a29c9e2c7454f /gdb | |
parent | 7514a661283b9725ceeb4385be67b6b5d7702b2c (diff) | |
download | binutils-3de0d96078193276795b9bdf72a25b77b60d8337.zip binutils-3de0d96078193276795b9bdf72a25b77b60d8337.tar.gz binutils-3de0d96078193276795b9bdf72a25b77b60d8337.tar.bz2 |
Use filtered output in show callbacks
"show" command callbacks, like most ordinary gdb commands, should use
filtered output. I found a few that did not, so this patch changes
them to use the filtered form.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/arch-utils.c | 16 | ||||
-rw-r--r-- | gdb/arm-tdep.c | 2 | ||||
-rw-r--r-- | gdb/cli/cli-logging.c | 4 | ||||
-rw-r--r-- | gdb/debuginfod-support.c | 8 |
4 files changed, 15 insertions, 15 deletions
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index fb92b99..63c3c6c 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -375,18 +375,18 @@ show_endian (struct ui_file *file, int from_tty, struct cmd_list_element *c, { if (target_byte_order_user == BFD_ENDIAN_UNKNOWN) if (gdbarch_byte_order (get_current_arch ()) == BFD_ENDIAN_BIG) - fprintf_unfiltered (file, _("The target endianness is set automatically " - "(currently big endian).\n")); + fprintf_filtered (file, _("The target endianness is set automatically " + "(currently big endian).\n")); else - fprintf_unfiltered (file, _("The target endianness is set automatically " - "(currently little endian).\n")); + fprintf_filtered (file, _("The target endianness is set automatically " + "(currently little endian).\n")); else if (target_byte_order_user == BFD_ENDIAN_BIG) - fprintf_unfiltered (file, - _("The target is set to big endian.\n")); + fprintf_filtered (file, + _("The target is set to big endian.\n")); else - fprintf_unfiltered (file, - _("The target is set to little endian.\n")); + fprintf_filtered (file, + _("The target is set to little endian.\n")); } static void diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index e4af38c..1068a0c 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -8623,7 +8623,7 @@ show_disassembly_style_sfunc (struct ui_file *file, int from_tty, len = strcspn (style, ","); } - fprintf_unfiltered (file, "The disassembly style is \"%.*s\".\n", len, style); + fprintf_filtered (file, "The disassembly style is \"%.*s\".\n", len, style); } /* Return the ARM register name corresponding to register I. */ diff --git a/gdb/cli/cli-logging.c b/gdb/cli/cli-logging.c index bad4d1a..9afd51e 100644 --- a/gdb/cli/cli-logging.c +++ b/gdb/cli/cli-logging.c @@ -181,9 +181,9 @@ show_logging_enabled (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { if (logging_enabled) - fprintf_unfiltered (file, _("Logging is enabled.\n")); + fprintf_filtered (file, _("Logging is enabled.\n")); else - fprintf_unfiltered (file, _("Logging is disabled.\n")); + fprintf_filtered (file, _("Logging is disabled.\n")); } void _initialize_cli_logging (); diff --git a/gdb/debuginfod-support.c b/gdb/debuginfod-support.c index 633cfdb..85abd72 100644 --- a/gdb/debuginfod-support.c +++ b/gdb/debuginfod-support.c @@ -299,9 +299,9 @@ static void show_debuginfod_enabled (ui_file *file, int from_tty, cmd_list_element *cmd, const char *value) { - fprintf_unfiltered (file, - _("Debuginfod functionality is currently set to " - "\"%s\".\n"), debuginfod_enabled); + fprintf_filtered (file, + _("Debuginfod functionality is currently set to " + "\"%s\".\n"), debuginfod_enabled); } /* Set callback for "set debuginfod urls". */ @@ -342,7 +342,7 @@ show_debuginfod_urls (ui_file *file, int from_tty, cmd_list_element *cmd, const char *value) { if (value[0] == '\0') - fprintf_unfiltered (file, _("Debuginfod URLs have not been set.\n")); + fprintf_filtered (file, _("Debuginfod URLs have not been set.\n")); else fprintf_filtered (file, _("Debuginfod URLs are currently set to:\n%s\n"), value); |