* lynx-nat.c (child_wait): Handle threads exiting.
authorJeff Law <law@redhat.com>
Thu, 27 Jul 1995 19:57:16 +0000 (19:57 +0000)
committerJeff Law <law@redhat.com>
Thu, 27 Jul 1995 19:57:16 +0000 (19:57 +0000)
gdb/lynx-nat.c

index 4b2d288eee9192f1e155d9c262e8c35a486ba7c0..8122cf4a1f28d718e5f642454861f6c6b2281d9b 100644 (file)
@@ -666,6 +666,22 @@ child_wait (pid, ourstatus)
            error ("Signal for unknown thread was not SIGNEWTHREAD");
        }
 
+      /* Check for thread termination.  */
+      else if (WIFSTOPPED(status)
+              && WSTOPSIG(status) == SIGTRAP
+              && in_thread_list (pid))
+       {
+         int realsig;
+
+         realsig = ptrace (PTRACE_GETTRACESIG, pid, (PTRACE_ARG3_TYPE)0, 0);
+
+         if (realsig == SIGTHREADEXIT)
+           {
+             ptrace (PTRACE_CONT, PIDGET (pid), (PTRACE_ARG3_TYPE)0, 0);
+             continue;
+           }
+       }
+
 #ifdef SPARC
       /* SPARC Lynx uses an byte reversed wait status; we must use the
         host macros to access it.  These lines just a copy of
This page took 0.025846 seconds and 4 git commands to generate.