* lynx-nat.c (child_wait): A thread_id of zero from wait apparently
authorJeff Law <law@redhat.com>
Thu, 20 Jul 1995 21:25:12 +0000 (21:25 +0000)
committerJeff Law <law@redhat.com>
Thu, 20 Jul 1995 21:25:12 +0000 (21:25 +0000)
        means the process is single threaded, so there's no need to add
        it to the thread list.  Handle case where multi-threaded process
        reverts back to a single-threaded process.

gdb/ChangeLog
gdb/lynx-nat.c

index ac6e7408f1acc7725757c8e7af639112b755b030..7767c6dcb5caf8d8fec4572acb379bbe801cbc7c 100644 (file)
@@ -1,4 +1,9 @@
-Thu Jul 20 15:00:31 1995  Jeff Law  (law@snake.cs.utah.edu)
+Thu Jul 20 14:18:51 1995  Jeffrey A. Law  <law@rtl.cygnus.com>
+
+       * lynx-nat.c (child_wait): A thread_id of zero from wait apparently
+       means the process is single threaded, so there's no need to add
+       it to the thread list.  Handle case where multi-threaded process
+       reverts back to a single-threaded process.
 
        * gdbserver/low-hppabsd.c: Remove error declaration.
        * gdbserver/low-sparc.c: Likewise.
index 1ab9cc7cc678934703198962e27f82df4c7af48c..883496ed7b406a0d07252800d1b94ca900edf20f 100644 (file)
@@ -631,7 +631,7 @@ child_wait (pid, ourstatus)
       /* Initial thread value can only be acquired via wait, so we have to
         resort to this hack.  */
 
-      if (TIDGET (inferior_pid) == 0)
+      if (TIDGET (inferior_pid) == 0 && thread != 0)
        {
          inferior_pid = BUILDPID (inferior_pid, thread);
          add_thread (inferior_pid);
@@ -639,6 +639,11 @@ child_wait (pid, ourstatus)
 
       pid = BUILDPID (pid, thread);
 
+      /* We've become a single threaded process again.  */
+      if (thread == 0)
+       inferior_pid = pid;
+
+      /* Check for thread creation.  */
       if (WIFSTOPPED(status)
          && WSTOPSIG(status) == SIGTRAP
          && !in_thread_list (pid))
This page took 0.039709 seconds and 4 git commands to generate.