diff options
Diffstat (limited to 'linuxthreads_db')
-rw-r--r-- | linuxthreads_db/ChangeLog | 6 | ||||
-rw-r--r-- | linuxthreads_db/td_ta_thr_iter.c | 4 | ||||
-rw-r--r-- | linuxthreads_db/td_thr_get_info.c | 4 |
3 files changed, 10 insertions, 4 deletions
diff --git a/linuxthreads_db/ChangeLog b/linuxthreads_db/ChangeLog index befb611a4f..76dbb17da8 100644 --- a/linuxthreads_db/ChangeLog +++ b/linuxthreads_db/ChangeLog @@ -1,3 +1,9 @@ +1999-10-11 Ulrich Drepper <drepper@cygnus.com> + + * td_thr_get_info.c: Initialize ti_type field. + + * td_ta_thr_iter.c: Also report the manager thread. + 1999-10-08 Andreas Jaeger <aj@suse.de> * thread_db.h: Fix typos in comments. diff --git a/linuxthreads_db/td_ta_thr_iter.c b/linuxthreads_db/td_ta_thr_iter.c index ffb4ef23ea..e25230c2b4 100644 --- a/linuxthreads_db/td_ta_thr_iter.c +++ b/linuxthreads_db/td_ta_thr_iter.c @@ -37,10 +37,6 @@ td_ta_thr_iter (const td_thragent_t *ta, td_thr_iter_f *callback, { struct pthread_handle_struct phc; - if (cnt == 1) - /* Skip the manager thread. */ - continue; - if (ps_pdread (ta->ph, handles, &phc, sizeof (struct pthread_handle_struct)) != PS_OK) return TD_ERR; /* XXX Other error value? */ diff --git a/linuxthreads_db/td_thr_get_info.c b/linuxthreads_db/td_thr_get_info.c index 90015fb191..61d0b9ead5 100644 --- a/linuxthreads_db/td_thr_get_info.c +++ b/linuxthreads_db/td_thr_get_info.c @@ -43,6 +43,10 @@ td_thr_get_info (const td_thrhandle_t *th, td_thrinfo_t *infop) infop->ti_tid = pds.p_tid; infop->ti_tls = (char *) pds.p_specific; infop->ti_pri = pds.p_priority; + /* The first thread (0 being the initial one) is the manager thread + Mark it appropriately. */ + infop->ti_type = ((pds.p_tid % th->th_ta_p->pthread_threads_max) == 1 + ? TD_THR_SYSTEM : TD_THR_USER); /* We can get the following information only if the thread descriptor in the target processor is large enough, i.e., comes from a recent |