From: Tom Tromey Date: Mon, 27 Dec 2021 04:42:03 +0000 (-0700) Subject: Use filtered output in kill command X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=34fda50beed954b3fa392297c34c9417a81d7a38;p=binutils-gdb.git 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. --- 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