Introduce a new proc service routine ps_linfo() to get LWP info.

This commit is contained in:
David Xu 2006-02-07 02:29:55 +00:00
parent 4db106a906
commit d56a014b6e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=155412
2 changed files with 15 additions and 0 deletions

View file

@ -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;
}

View file

@ -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 *,