aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcmd.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2021-12-26 21:42:03 -0700
committerTom Tromey <tom@tromey.com>2022-01-05 11:36:33 -0700
commit34fda50beed954b3fa392297c34c9417a81d7a38 (patch)
tree4daf80a04839b8e12d65e0399ec89947f8845041 /gdb/infcmd.c
parentb58f47ab4cae11166f210f54bca6e7c58b855a0f (diff)
downloadgdb-34fda50beed954b3fa392297c34c9417a81d7a38.zip
gdb-34fda50beed954b3fa392297c34c9417a81d7a38.tar.gz
gdb-34fda50beed954b3fa392297c34c9417a81d7a38.tar.bz2
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.
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r--gdb/infcmd.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index e0e317d..8bf5801 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