diff options
author | Daniel Jacobowitz <drow@false.org> | 2007-01-03 17:57:16 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2007-01-03 17:57:16 +0000 |
commit | 9d6063994fbb0f0ec4fb8005f18bc84768592368 (patch) | |
tree | 585c0fa25b157dc16cbccb9dc0df5f1cd43d7fb0 /gdb/gdbserver/win32-i386-low.c | |
parent | 61a771aa2e37ad529478386d7c18840d3696c9aa (diff) | |
download | gdb-9d6063994fbb0f0ec4fb8005f18bc84768592368.zip gdb-9d6063994fbb0f0ec4fb8005f18bc84768592368.tar.gz gdb-9d6063994fbb0f0ec4fb8005f18bc84768592368.tar.bz2 |
* linux-low.c (linux_kill): Handle being called with no threads.
* win32-i386-low.c (win32_kill): Likewise.
(get_child_debug_event): Clear current_process_handle.
Diffstat (limited to 'gdb/gdbserver/win32-i386-low.c')
-rw-r--r-- | gdb/gdbserver/win32-i386-low.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/gdbserver/win32-i386-low.c b/gdb/gdbserver/win32-i386-low.c index de6ef0b..ee2d2d1 100644 --- a/gdb/gdbserver/win32-i386-low.c +++ b/gdb/gdbserver/win32-i386-low.c @@ -582,6 +582,9 @@ win32_attach (unsigned long pid) static void win32_kill (void) { + if (current_process_handle == NULL) + return; + TerminateProcess (current_process_handle, 0); for (;;) { @@ -901,6 +904,7 @@ in: ourstatus->kind = TARGET_WAITKIND_EXITED; ourstatus->value.integer = current_event.u.ExitProcess.dwExitCode; CloseHandle (current_process_handle); + current_process_handle = NULL; retval = main_thread_id; break; |