Make linux_nat_detach/thread_db_detach use the inferior parameter
[deliverable/binutils-gdb.git] / gdb / inf-ptrace.c
index aa8b17f41a52802058cd89ac57cdcc1b5e2db9af..72aa33480f4253eda9b0a3c4e8b92cae70f31a8c 100644 (file)
@@ -263,18 +263,16 @@ inf_ptrace_detach (struct target_ops *ops, inferior *inf, int from_tty)
   error (_("This system does not support detaching from a process"));
 #endif
 
-  inf_ptrace_detach_success (ops);
+  inf_ptrace_detach_success (ops, inf);
 }
 
 /* See inf-ptrace.h.  */
 
 void
-inf_ptrace_detach_success (struct target_ops *ops)
+inf_ptrace_detach_success (struct target_ops *ops, inferior *inf)
 {
-  pid_t pid = ptid_get_pid (inferior_ptid);
-
   inferior_ptid = null_ptid;
-  detach_inferior (pid);
+  detach_inferior (inf);
 
   inf_child_maybe_unpush_target (ops);
 }
This page took 0.025184 seconds and 4 git commands to generate.