Remove IRIX 5 <sys/proc.h> _KMEMUSER workaround
[deliverable/binutils-gdb.git] / gdb / inf-ptrace.c
index dd11043a968ffc2a0f4564e3f09cebee6c584285..64aaabe03ed5f1aa38cdd10353ae51fb76d15905 100644 (file)
@@ -257,6 +257,16 @@ inf_ptrace_detach (struct target_ops *ops, const char *args, int from_tty)
   error (_("This system does not support detaching from a process"));
 #endif
 
+  inf_ptrace_detach_success (ops);
+}
+
+/* See inf-ptrace.h.  */
+
+void
+inf_ptrace_detach_success (struct target_ops *ops)
+{
+  pid_t pid = ptid_get_pid (inferior_ptid);
+
   inferior_ptid = null_ptid;
   detach_inferior (pid);
 
@@ -277,7 +287,7 @@ inf_ptrace_kill (struct target_ops *ops)
   ptrace (PT_KILL, pid, (PTRACE_TYPE_ARG3)0, 0);
   waitpid (pid, &status, 0);
 
-  target_mourn_inferior ();
+  target_mourn_inferior (inferior_ptid);
 }
 
 /* Interrupt the inferior.  */
This page took 0.024923 seconds and 4 git commands to generate.