From 0af4ad84276157e5bb7a73054ed3f754eacc9182 Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 8 Sep 2019 01:33:55 +0000 Subject: mgdb: implemented winnt_mourn_inferior(), revised winnt_abandon() accordingly. --- overlay/mgdb/gdb/winnt-nat.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/overlay/mgdb/gdb/winnt-nat.c b/overlay/mgdb/gdb/winnt-nat.c index a2c2006..2574f09 100644 --- a/overlay/mgdb/gdb/winnt-nat.c +++ b/overlay/mgdb/gdb/winnt-nat.c @@ -349,13 +349,9 @@ static void winnt_attach (struct target_ops * t, const char * args, int from_tty winnt_prepare(t,pid,pfd,from_tty); } -static void winnt_abandon (struct target_ops * t, winnt_process * pidinfo) +static void winnt_abandon (winnt_process * pidinfo) { inferior_ptid = null_ptid; - - x86_cleanup_dregs(); - inf_child_maybe_unpush_target(t); - winnt_plist_remove(pidinfo->pid); } @@ -378,7 +374,7 @@ static void winnt_detach (struct target_ops * t, const char * args, int from_tty detach_inferior(pidinfo->syspid); - winnt_abandon(t,pidinfo); + winnt_abandon(pidinfo); } static ptid_t winnt_wait( @@ -439,12 +435,14 @@ static void winnt_kill (struct target_ops * t) if (__dbg_kill(pidinfo->pfd) < 0) winnt_perror("failed to kill current inferior",cinf->pid); - winnt_abandon(t,pidinfo); + winnt_abandon(pidinfo); } static void winnt_mourn_inferior (struct target_ops * t) { - /* update plist, etc. */ + x86_cleanup_dregs(); + inf_child_maybe_unpush_target(t); + inf_child_mourn_inferior(t); } static void winnt_create_inferior( -- cgit v1.2.3