public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Use filtered output in kill command
@ 2022-01-05 18:53 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2022-01-05 18:53 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=34fda50beed954b3fa392297c34c9417a81d7a38

commit 34fda50beed954b3fa392297c34c9417a81d7a38
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Dec 26 21:42:03 2021 -0700

    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:
---
 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-05 18:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-05 18:53 [binutils-gdb] Use filtered output in kill command Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).