Lines Matching defs:phdl
48 proc_init(pid_t pid, int flags, int status, struct proc_handle *phdl)
54 memset(phdl, 0, sizeof(*phdl));
55 phdl->pid = pid;
56 phdl->flags = flags;
57 phdl->status = status;
63 len = sizeof(phdl->execname);
64 if (sysctl(mib, 4, phdl->execname, &len, NULL, 0) != 0) {
70 phdl->execname[0] = '\0';
85 phdl->model = (kp.p_flag & P_32) ? PR_MODEL_ILP32 : PR_MODEL_LP64;
87 phdl->model = PR_MODEL_ILP32;
96 struct proc_handle *phdl;
107 if ((phdl = malloc(sizeof(struct proc_handle))) == NULL)
112 error = proc_init(pid, flags, PS_RUN, phdl);
116 if (ptrace(PT_ATTACH, phdl->pid, 0, 0) != 0) {
133 phdl->status = PS_STOP;
137 proc_free(phdl);
139 *pphdl = phdl;
147 struct proc_handle *phdl;
156 if ((phdl = malloc(sizeof(struct proc_handle))) == NULL)
179 error = proc_init(pid, 0, PS_IDLE, phdl);
196 phdl->status = PS_STOP;
200 proc_free(phdl);
202 *pphdl = phdl;
207 proc_free(struct proc_handle *phdl)
209 free(phdl);