summaryrefslogtreecommitdiff
path: root/overlay/mgdb/gdb/winnt-nat.c
diff options
context:
space:
mode:
Diffstat (limited to 'overlay/mgdb/gdb/winnt-nat.c')
-rw-r--r--overlay/mgdb/gdb/winnt-nat.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/overlay/mgdb/gdb/winnt-nat.c b/overlay/mgdb/gdb/winnt-nat.c
index 2574f09..7ae3bf6 100644
--- a/overlay/mgdb/gdb/winnt-nat.c
+++ b/overlay/mgdb/gdb/winnt-nat.c
@@ -349,6 +349,13 @@ static void winnt_attach (struct target_ops * t, const char * args, int from_tty
winnt_prepare(t,pid,pfd,from_tty);
}
+static void winnt_mourn_inferior (struct target_ops * t)
+{
+ x86_cleanup_dregs();
+ inf_child_maybe_unpush_target(t);
+ inf_child_mourn_inferior(t);
+}
+
static void winnt_abandon (winnt_process * pidinfo)
{
inferior_ptid = null_ptid;
@@ -375,6 +382,7 @@ static void winnt_detach (struct target_ops * t, const char * args, int from_tty
detach_inferior(pidinfo->syspid);
winnt_abandon(pidinfo);
+ winnt_mourn_inferior(t);
}
static ptid_t winnt_wait(
@@ -436,13 +444,7 @@ static void winnt_kill (struct target_ops * t)
winnt_perror("failed to kill current inferior",cinf->pid);
winnt_abandon(pidinfo);
-}
-
-static void winnt_mourn_inferior (struct target_ops * t)
-{
- x86_cleanup_dregs();
- inf_child_maybe_unpush_target(t);
- inf_child_mourn_inferior(t);
+ winnt_mourn_inferior(t);
}
static void winnt_create_inferior(