summaryrefslogtreecommitdiffstats
path: root/lib/libthread_db
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2006-02-07 02:55:34 +0000
committerdavidxu <davidxu@FreeBSD.org>2006-02-07 02:55:34 +0000
commitb9945d52e2cc57d71eeca4887e493f697ee87a33 (patch)
tree4855c23df7901d622a6fcc22cdbf1d805d142474 /lib/libthread_db
parent6cfb2f2fcea581eb5a02bea1cbb4070031f0e27e (diff)
downloadFreeBSD-src-b9945d52e2cc57d71eeca4887e493f697ee87a33.zip
FreeBSD-src-b9945d52e2cc57d71eeca4887e493f697ee87a33.tar.gz
Use ps_linfo to retrieve LWP info, current it is used to retrieve
signal mask and pending signals.
Diffstat (limited to 'lib/libthread_db')
-rw-r--r--lib/libthread_db/libthr_db.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libthread_db/libthr_db.c b/lib/libthread_db/libthr_db.c
index aa639e9..0e09409 100644
--- a/lib/libthread_db/libthr_db.c
+++ b/lib/libthread_db/libthr_db.c
@@ -469,6 +469,7 @@ static td_err_e
pt_thr_get_info(const td_thrhandle_t *th, td_thrinfo_t *info)
{
const td_thragent_t *ta = th->th_ta;
+ struct ptrace_lwpinfo linfo;
int state;
int ret;
@@ -496,6 +497,11 @@ pt_thr_get_info(const td_thrhandle_t *th, td_thrinfo_t *info)
info->ti_tid = th->th_tid;
info->ti_thread = th->th_thread;
info->ti_ta_p = th->th_ta;
+ ret = ps_linfo(ta->ph, th->th_tid, &linfo);
+ if (ret == PS_OK) {
+ info->ti_sigmask = linfo.pl_sigmask;
+ info->ti_pending = linfo.pl_siglist;
+ }
if (state == ta->thread_state_running)
info->ti_state = TD_THR_RUN;
else if (state == ta->thread_state_zoombie)
OpenPOWER on IntegriCloud