Remove last traces of discard_all_inferiors
authorPedro Alves <palves@redhat.com>
Sun, 12 Jan 2020 00:40:02 +0000 (00:40 +0000)
committerPedro Alves <palves@redhat.com>
Sun, 12 Jan 2020 00:40:02 +0000 (00:40 +0000)
The multi-target patch should have removed all traces of
discard_all_inferiors, but somehow one use stayed behind along with
the definition of the function.

discard_all_inferiors is bad now because it blindly exits inferiors of
all target connections.  It's best to remove it.

gdb/ChangeLog:
2020-01-12  Pedro Alves  <palves@redhat.com>

* bsd-kvm.c (bsd_kvm_target::close): Call exit_inferior_silent
directly for the current inferior instead of
discard_all_inferiors.
(discard_all_inferiors): Delete.

gdb/ChangeLog
gdb/bsd-kvm.c
gdb/inferior.c

index 735c46bf70534707f0274db8f1f5a42e6d2cd36f..980114919dfce9a236f0a98ced1006a623fa84c1 100644 (file)
@@ -1,3 +1,10 @@
+2020-01-12  Pedro Alves  <palves@redhat.com>
+
+       * bsd-kvm.c (bsd_kvm_target::close): Call exit_inferior_silent
+       directly for the current inferior instead of
+       discard_all_inferiors.
+       (discard_all_inferiors): Delete.
+
 2020-01-11  Tom Tromey  <tom@tromey.com>
 
        * tui/tui-wingeneral.c (box_win): Check cli_styling.
index f864ba8b41ced3688fc922ef47ffbc571de3f0bb..b1b1fee5f4f4e8203ff88102e2f6dc37d33e1845 100644 (file)
@@ -156,7 +156,7 @@ bsd_kvm_target::close ()
     }
 
   inferior_ptid = null_ptid;
-  discard_all_inferiors ();
+  exit_inferior_silent (current_inferior ());
 }
 
 static LONGEST
index eb090dfde1a5850c6619b51440762e277e1a008f..c2e9da3d3d55b5a53c0d461f84eea806547857b9 100644 (file)
@@ -260,13 +260,6 @@ inferior_appeared (struct inferior *inf, int pid)
   gdb::observers::inferior_appeared.notify (inf);
 }
 
-void
-discard_all_inferiors (void)
-{
-  for (inferior *inf : all_non_exited_inferiors ())
-    exit_inferior_silent (inf);
-}
-
 struct inferior *
 find_inferior_id (int num)
 {
This page took 0.02691 seconds and 4 git commands to generate.