ptrace's first parameter is command not pid. pointy hat to me.

This commit is contained in:
David Xu 2004-07-16 06:11:48 +00:00
parent 2508f480c2
commit 794adb75ee

View File

@ -1078,13 +1078,17 @@ ps_lsetfpregs (struct ps_prochandle *ph, lwpid_t lwpid,
ps_err_e
ps_lstop(struct ps_prochandle *ph, lwpid_t lwpid)
{
return (ptrace (lwpid, PT_SUSPEND, 0, 0) == 0);
if (ptrace (PT_SUSPEND, lwpid, 0, 0) == -1)
return PS_ERR;
return PS_OK;
}
ps_err_e
ps_lcontinue(struct ps_prochandle *ph, lwpid_t lwpid)
{
return (ptrace (lwpid, PT_RESUME, 0, 0) == 0);
if (ptrace (PT_RESUME, lwpid, 0, 0) == -1)
return PS_ERR;
return PS_OK;
}
pid_t