Replace ptrace syscall with ps_lgetgregs to check a LWP's existence.
This commit is contained in:
parent
f9d7b4d515
commit
4db106a906
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=155411
@ -264,8 +264,8 @@ pt_ta_map_id2thr(const td_thragent_t *ta, thread_t id, td_thrhandle_t *th)
|
||||
return (P2T(ret));
|
||||
}
|
||||
/* check lwp */
|
||||
ret = ptrace(PT_GETREGS, ta->map[id].lwp, (caddr_t)&gregs, 0);
|
||||
if (ret != 0) {
|
||||
ret = ps_lgetregs(ta->ph, ta->map[id].lwp, gregs);
|
||||
if (ret != PS_OK) {
|
||||
/* no longer exists */
|
||||
ta->map[id].type = PT_NONE;
|
||||
return (TD_NOTHR);
|
||||
|
Loading…
Reference in New Issue
Block a user