mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-23 20:31:13 +01:00
Introduce a new proc service routine ps_linfo() to get LWP info.
This commit is contained in:
parent
4db106a906
commit
d56a014b6e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=155412
@ -1685,3 +1685,17 @@ ps_lcontinue(struct ps_prochandle *ph, lwpid_t lwpid)
|
||||
return PS_ERR;
|
||||
return PS_OK;
|
||||
}
|
||||
|
||||
ps_err_e
|
||||
ps_linfo(struct ps_prochandle *ph, lwpid_t lwpid, void *info)
|
||||
{
|
||||
if (fbsd_thread_core) {
|
||||
/* XXX should verify lwpid and make a pseudo lwp info */
|
||||
memset(info, 0, sizeof(struct ptrace_lwpinfo));
|
||||
return PS_OK;
|
||||
}
|
||||
|
||||
if (ptrace (PT_LWPINFO, lwpid, info, sizeof(struct ptrace_lwpinfo)) == -1)
|
||||
return PS_ERR;
|
||||
return PS_OK;
|
||||
}
|
||||
|
@ -56,6 +56,7 @@ ps_err_e ps_lgetxmmregs (struct ps_prochandle *, lwpid_t, char *);
|
||||
ps_err_e ps_lsetxmmregs (struct ps_prochandle *, lwpid_t, const char *);
|
||||
#endif
|
||||
ps_err_e ps_lstop(struct ps_prochandle *, lwpid_t);
|
||||
ps_err_e ps_linfo(struct ps_prochandle *, lwpid_t, void *);
|
||||
ps_err_e ps_pcontinue(struct ps_prochandle *);
|
||||
ps_err_e ps_pdmodel(struct ps_prochandle *, int *);
|
||||
ps_err_e ps_pglobal_lookup(struct ps_prochandle *, const char *, const char *,
|
||||
|
Loading…
Reference in New Issue
Block a user