From 1b08cf6c20537b2d8e839f534992e98cb6e09f76 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 11 Nov 1999 18:08:36 +0000 Subject: [PATCH] If p_pid field is zero, this is before the thread library is initialized and we get the PID from the debugger. --- linuxthreads_db/td_ta_map_lwp2thr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linuxthreads_db/td_ta_map_lwp2thr.c b/linuxthreads_db/td_ta_map_lwp2thr.c index f51bc18f169..0558f633f07 100644 --- a/linuxthreads_db/td_ta_map_lwp2thr.c +++ b/linuxthreads_db/td_ta_map_lwp2thr.c @@ -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; -- 2.47.2