aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2009-11-26 22:18:40 +0000
committerPedro Alves <palves@redhat.com>2009-11-26 22:18:40 +0000
commitaeeb81d1c7aae4a550685fee010a02f0c37ec57e (patch)
treee05dc76d3e1a6fbe1ad5077ecf6f047b0e936065 /gdb/gdbserver
parent103579754b2cae70f41b0420cc266b03aab77c87 (diff)
downloadgdb-aeeb81d1c7aae4a550685fee010a02f0c37ec57e.zip
gdb-aeeb81d1c7aae4a550685fee010a02f0c37ec57e.tar.gz
gdb-aeeb81d1c7aae4a550685fee010a02f0c37ec57e.tar.bz2
* win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
events, don't leave current_inferior pointing at null.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog5
-rw-r--r--gdb/gdbserver/win32-low.c9
2 files changed, 9 insertions, 5 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 64619ee..81707a7 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,10 @@
2009-11-26 Pedro Alves <pedro@codesourcery.com>
+ * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
+ events, don't leave current_inferior pointing at null.
+
+2009-11-26 Pedro Alves <pedro@codesourcery.com>
+
* win32-low.c (LOG): Delete.
(OUTMSG): Output to stderr.
(OUTMSG2): Conditionalize on `debug_threads' variable, instead of
diff --git a/gdb/gdbserver/win32-low.c b/gdb/gdbserver/win32-low.c
index 3b9ae59..57633f1 100644
--- a/gdb/gdbserver/win32-low.c
+++ b/gdb/gdbserver/win32-low.c
@@ -1438,10 +1438,6 @@ get_child_debug_event (struct target_waitstatus *ourstatus)
gotevent:
- ptid = debug_event_ptid (&current_event);
- current_inferior =
- (struct thread_info *) find_inferior_id (&all_threads, ptid);
-
switch (current_event.dwDebugEventCode)
{
case CREATE_THREAD_DEBUG_EVENT:
@@ -1463,7 +1459,9 @@ get_child_debug_event (struct target_waitstatus *ourstatus)
(unsigned) current_event.dwThreadId));
child_delete_thread (current_event.dwProcessId,
current_event.dwThreadId);
- break;
+
+ current_inferior = (struct thread_info *) all_threads.head;
+ return 1;
case CREATE_PROCESS_DEBUG_EVENT:
OUTMSG2 (("gdbserver: kernel event CREATE_PROCESS_DEBUG_EVENT "
@@ -1558,6 +1556,7 @@ get_child_debug_event (struct target_waitstatus *ourstatus)
break;
}
+ ptid = debug_event_ptid (&current_event);
current_inferior =
(struct thread_info *) find_inferior_id (&all_threads, ptid);
return 1;