From c1ee2fb3cb80ce3a7082002797712d5ffce33e21 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Wed, 21 May 2014 22:28:23 +0100 Subject: Native targets: Add inf-child.c:inf_child_mourn_inferior and use it. Most ports do the same thing in the tail of their mourn routine - call generic_mourn_inferior+inf_child_maybe_unpush_target. This factors that out to a convenience function. More could be done, but this converts only the really obvious ones. Tested by building GDB on x86_64 Fedora 20, mingw32 and djgpp. The rest is untested, but I think a patch can't get more obvious. gdb/ 2014-05-21 Pedro Alves * inf-child.c (inf_child_mourn_inferior): New function. * inf-child.h (inf_child_mourn_inferior): New declaration. * darwin-nat.c (darwin_mourn_inferior): Use inf_child_mourn_inferior. * gnu-nat.c (gnu_mourn_inferior): Likewise. * inf-ptrace.c (inf_ptrace_mourn_inferior): Likewise. * inf-ttrace.c (inf_ttrace_mourn_inferior): Likewise. * nto-procfs.c (procfs_mourn_inferior): Likewise. * windows-nat.c (windows_mourn_inferior): Likewise. --- gdb/windows-nat.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gdb/windows-nat.c') diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index fe43c24..88844fe 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -2368,8 +2368,7 @@ windows_mourn_inferior (struct target_ops *ops) CHECK (CloseHandle (current_process_handle)); open_process_used = 0; } - generic_mourn_inferior (); - inf_child_maybe_unpush_target (ops); + inf_child_mourn_inferior (ops); } /* Send a SIGINT to the process group. This acts just like the user typed a -- cgit v1.1