]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
If p_pid field is zero, this is before the thread library is
authorUlrich Drepper <drepper@redhat.com>
Thu, 11 Nov 1999 18:08:36 +0000 (18:08 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 11 Nov 1999 18:08:36 +0000 (18:08 +0000)
initialized and we get the PID from the debugger.

linuxthreads_db/td_ta_map_lwp2thr.c

index f51bc18f16900bfa04f33726de8e3f1ff3af7b27..0558f633f07189a862b67eb0860c6d88e246f0ad 100644 (file)
@@ -67,7 +67,7 @@ td_ta_map_lwp2thr (const td_thragent_t *ta, lwpid_t lwpid, td_thrhandle_t *th)
        if (ps_pdread (ta->ph, phc[cnt].h_descr, &pds, sizeof_descr) != PS_OK)
          return TD_ERR;        /* XXX Other error value?  */
 
-       if (pds.p_pid == lwpid)
+       if (pds.p_pid ?: ps_getpid (ta->ph) == lwpid)
          {
            /* Found it.  Now fill in the `td_thrhandle_t' object.  */
            th->th_ta_p = (td_thragent_t *) ta;