diff options
author | Roland McGrath <roland@redhat.com> | 2009-11-22 20:42:53 -0800 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 2009-12-09 01:01:28 -0800 |
commit | 6f1672172c9c9e5eb5afdcf521e3528b38b2e2dd (patch) | |
tree | f1ca70b5d1c32d593b0c2e825f10c56b49d14c06 /nptl_db/td_thr_validate.c | |
parent | ee1a7fabb4e0abd3e73e828ce326dcb5fd38b874 (diff) | |
download | glibc-6f1672172c9c9e5eb5afdcf521e3528b38b2e2dd.tar.gz glibc-6f1672172c9c9e5eb5afdcf521e3528b38b2e2dd.tar.xz glibc-6f1672172c9c9e5eb5afdcf521e3528b38b2e2dd.zip |
Make libthread_db work without libpthread, just enough for TLS decoding. roland/nptl_db
Diffstat (limited to 'nptl_db/td_thr_validate.c')
-rw-r--r-- | nptl_db/td_thr_validate.c | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/nptl_db/td_thr_validate.c b/nptl_db/td_thr_validate.c index adcde3c87e..45d8546dd8 100644 --- a/nptl_db/td_thr_validate.c +++ b/nptl_db/td_thr_validate.c @@ -62,24 +62,30 @@ td_thr_validate (const td_thrhandle_t *th) LOG ("td_thr_validate"); - /* First check the list with threads using user allocated stacks. */ - bool uninit = false; - err = DB_GET_SYMBOL (list, th->th_ta_p, __stack_user); - if (err == TD_OK) - err = check_thread_list (th, list, &uninit); - - /* If our thread is not on this list search the list with stack - using implementation allocated stacks. */ - if (err == TD_NOTHR) + err = _td_ta_check_nptl (th->th_ta_p); + if (err == TD_NOLIBTHREAD && th->th_unique == 0) + err = TD_OK; + else if (err == TD_OK) { - err = DB_GET_SYMBOL (list, th->th_ta_p, stack_used); + /* First check the list with threads using user allocated stacks. */ + bool uninit = false; + err = DB_GET_SYMBOL (list, th->th_ta_p, __stack_user); if (err == TD_OK) err = check_thread_list (th, list, &uninit); - if (err == TD_NOTHR && uninit && th->th_unique == 0) - /* __pthread_initialize_minimal has not run yet. - There is only the special case thread handle. */ - err = TD_OK; + /* If our thread is not on this list search the list with stack + using implementation allocated stacks. */ + if (err == TD_NOTHR) + { + err = DB_GET_SYMBOL (list, th->th_ta_p, stack_used); + if (err == TD_OK) + err = check_thread_list (th, list, &uninit); + + if (err == TD_NOTHR && uninit && th->th_unique == 0) + /* __pthread_initialize_minimal has not run yet. + There is only the special case thread handle. */ + err = TD_OK; + } } if (err == TD_OK) |