From: Tom Tromey Date: Mon, 27 Dec 2021 01:33:12 +0000 (-0700) Subject: Use filtered output in terminal_info implementations X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=50f5d5c34d321275c4e59b2f098023f674c617d8;p=binutils-gdb.git Use filtered output in terminal_info implementations This changes one terminal_info implementation, and default_terminal_info, to use filtered output. Other implementations of this method already use filtered output. I can't compile go32-nat.c, so this is a 'best effort' patch. --- diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c index 204c2121006..91fae3dd7f4 100644 --- a/gdb/go32-nat.c +++ b/gdb/go32-nat.c @@ -899,9 +899,9 @@ go32_nat_target::terminal_init () void go32_nat_target::terminal_info (const char *args, int from_tty) { - printf_unfiltered ("Inferior's terminal is in %s mode.\n", - !inf_mode_valid - ? "default" : inf_terminal_mode ? "raw" : "cooked"); + printf_filtered ("Inferior's terminal is in %s mode.\n", + !inf_mode_valid + ? "default" : inf_terminal_mode ? "raw" : "cooked"); #if __DJGPP_MINOR__ > 2 if (child_cmd.redirection) @@ -911,15 +911,15 @@ go32_nat_target::terminal_info (const char *args, int from_tty) for (i = 0; i < DBG_HANDLES; i++) { if (child_cmd.redirection[i]->file_name) - printf_unfiltered ("\tFile handle %d is redirected to `%s'.\n", - i, child_cmd.redirection[i]->file_name); + printf_filtered ("\tFile handle %d is redirected to `%s'.\n", + i, child_cmd.redirection[i]->file_name); else if (_get_dev_info (child_cmd.redirection[i]->inf_handle) == -1) - printf_unfiltered + printf_filtered ("\tFile handle %d appears to be closed by inferior.\n", i); /* Mask off the raw/cooked bit when comparing device info words. */ else if ((_get_dev_info (child_cmd.redirection[i]->inf_handle) & 0xdf) != (_get_dev_info (i) & 0xdf)) - printf_unfiltered + printf_filtered ("\tFile handle %d appears to be redirected by inferior.\n", i); } } diff --git a/gdb/target.c b/gdb/target.c index b3b1bbd06b2..1a072297fa6 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -1127,7 +1127,7 @@ noprocess (void) static void default_terminal_info (struct target_ops *self, const char *args, int from_tty) { - printf_unfiltered (_("No saved terminal information.\n")); + printf_filtered (_("No saved terminal information.\n")); } /* A default implementation for the to_get_ada_task_ptid target method.