aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads_db/td_ta_map_lwp2thr.c
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads_db/td_ta_map_lwp2thr.c')
-rw-r--r--linuxthreads_db/td_ta_map_lwp2thr.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/linuxthreads_db/td_ta_map_lwp2thr.c b/linuxthreads_db/td_ta_map_lwp2thr.c
index 1fc614cc21..dd2fcbfe4e 100644
--- a/linuxthreads_db/td_ta_map_lwp2thr.c
+++ b/linuxthreads_db/td_ta_map_lwp2thr.c
@@ -76,7 +76,16 @@ td_ta_map_lwp2thr (const td_thragent_t *ta, lwpid_t lwpid, td_thrhandle_t *th)
return TD_OK;
}
- }
+ }
+ else if (cnt == 0)
+ {
+ /* The initial thread always exists. But it might not yet be
+ initialized. Construct a value. */
+ th->th_ta_p = (td_thragent_t *) ta;
+ th->th_unique = NULL;
+
+ return TD_OK;
+ }
return TD_NOLWP;
}