X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gdb%2Fgdbserver%2Fwin32-low.c;h=17729a83cc63345d1faefb54b78fda635ae9cc0b;hb=ef2ddb33bd29a7c4f7027b9e37e55c74c15af825;hp=8a20972bd4ecd1b49694641a9e5dc01da64ae3f0;hpb=9451a3b9a1af46cbe988c3a2cf4c4754d7e84143;p=binutils-gdb.git diff --git a/gdb/gdbserver/win32-low.c b/gdb/gdbserver/win32-low.c index 8a20972bd4e..17729a83cc6 100644 --- a/gdb/gdbserver/win32-low.c +++ b/gdb/gdbserver/win32-low.c @@ -834,11 +834,11 @@ win32_kill (int pid) return 0; } -/* Detach from inferior PID. */ +/* Implementation of target_ops::detach. */ + static int -win32_detach (int pid) +win32_detach (process_info *process) { - struct process_info *process; winapi_DebugActiveProcessStop DebugActiveProcessStop = NULL; winapi_DebugSetProcessKillOnExit DebugSetProcessKillOnExit = NULL; #ifdef _WIN32_WCE @@ -865,7 +865,6 @@ win32_detach (int pid) return -1; DebugSetProcessKillOnExit (FALSE); - process = find_process_pid (pid); remove_process (process); win32_clear_inferiors (); @@ -878,11 +877,12 @@ win32_mourn (struct process_info *process) remove_process (process); } -/* Wait for inferiors to end. */ +/* Implementation of target_ops::join. */ + static void -win32_join (int pid) +win32_join (process_info *proc) { - HANDLE h = OpenProcess (PROCESS_ALL_ACCESS, FALSE, pid); + HANDLE h = OpenProcess (PROCESS_ALL_ACCESS, FALSE, proc->pid); if (h != NULL) { WaitForSingleObject (h, INFINITE);