* gnu-nat.c (gnu_attach): Add process to inferiors table.
[deliverable/binutils-gdb.git] / gdb / target.c
index 231a6bb0e929d2108336e1c780b50b3b5dfc796b..2fefa840c3b08b19cb78c67b5ee819232bfa613c 100644 (file)
@@ -2338,8 +2338,17 @@ void
 generic_mourn_inferior (void)
 {
   extern int show_breakpoint_hit_counts;
+  ptid_t ptid;
 
+  ptid = inferior_ptid;
   inferior_ptid = null_ptid;
+
+  if (!ptid_equal (ptid, null_ptid))
+    {
+      int pid = ptid_get_pid (ptid);
+      delete_inferior (pid);
+    }
+
   attach_flag = 0;
   breakpoint_init_inferior (inf_exited);
   registers_changed ();
This page took 0.024838 seconds and 4 git commands to generate.