From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id 4F3CF3858001; Wed, 5 Jan 2022 18:53:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4F3CF3858001 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Use filtered output in kill command X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: b58f47ab4cae11166f210f54bca6e7c58b855a0f X-Git-Newrev: 34fda50beed954b3fa392297c34c9417a81d7a38 Message-Id: <20220105185356.4F3CF3858001@sourceware.org> Date: Wed, 5 Jan 2022 18:53:56 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jan 2022 18:53:56 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D34fda50beed9= 54b3fa392297c34c9417a81d7a38 commit 34fda50beed954b3fa392297c34c9417a81d7a38 Author: Tom Tromey Date: Sun Dec 26 21:42:03 2021 -0700 Use filtered output in kill command =20 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: --- 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 =3D current_inferior ()->num; =20 target_kill (); + bfd_cache_close_all (); =20 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 ()); } =20 /* Used in `attach&' command. Proceed threads of inferior INF iff