From 34fda50beed954b3fa392297c34c9417a81d7a38 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 26 Dec 2021 21:42:03 -0700 Subject: [PATCH] Use filtered output in kill command This changes the kill command to use filtered output. I split this one into its own patch because, out of an abundance of caution, I changed the function to call bfd_cache_close_all a bit earlier, in case pagination caused an exception. --- gdb/infcmd.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gdb/infcmd.c b/gdb/infcmd.c index e0e317d0757..8bf58018bdd 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -2349,12 +2349,11 @@ kill_command (const char *arg, int from_tty) int infnum = current_inferior ()->num; target_kill (); + bfd_cache_close_all (); if (print_inferior_events) - printf_unfiltered (_("[Inferior %d (%s) killed]\n"), - infnum, pid_str.c_str ()); - - bfd_cache_close_all (); + printf_filtered (_("[Inferior %d (%s) killed]\n"), + infnum, pid_str.c_str ()); } /* Used in `attach&' command. Proceed threads of inferior INF iff -- 2.30.2