From 421f63ed6fdebb863795ed0a1f243c3f20655624 Mon Sep 17 00:00:00 2001 From: midipix Date: Wed, 18 Sep 2019 03:51:41 +0000 Subject: mgdb: winnt_mourn_inferior(), winnt_abandon(): preceed winnt_prepare(). --- overlay/mgdb/gdb/winnt-nat.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/overlay/mgdb/gdb/winnt-nat.c b/overlay/mgdb/gdb/winnt-nat.c index 64e4e65..6b13336 100644 --- a/overlay/mgdb/gdb/winnt-nat.c +++ b/overlay/mgdb/gdb/winnt-nat.c @@ -306,6 +306,22 @@ static void winnt_get_modules(struct winnt_process * pidinfo) mark += sprintf(mark,"\n"); } +static void winnt_mourn_inferior (struct target_ops * t) +{ + if (inferior_ptid.pid) + winnt_plist_remove(inferior_ptid.pid); + + 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; + winnt_plist_remove(pidinfo->pid); +} + ssize_t winnt_xfer_solibs( struct winnt_process * pidinfo, gdb_byte * readbuf, @@ -732,22 +748,6 @@ static void winnt_attach (struct target_ops * t, const char * args, int from_tty winnt_get_modules(winnt_process_record(pid)); } -static void winnt_mourn_inferior (struct target_ops * t) -{ - if (inferior_ptid.pid) - winnt_plist_remove(inferior_ptid.pid); - - 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; - winnt_plist_remove(pidinfo->pid); -} - static void winnt_detach (struct target_ops * t, const char * args, int from_tty) { pid_t pid; -- cgit v1.2.3