diff options
Diffstat (limited to 'gdb/inf-ptrace.c')
-rw-r--r-- | gdb/inf-ptrace.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c index dd11043..0896cff 100644 --- a/gdb/inf-ptrace.c +++ b/gdb/inf-ptrace.c @@ -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); |