Lines Matching refs:P
47 Ppltdest(struct ps_prochandle *P, uintptr_t pltaddr) in Ppltdest() argument
49 map_info_t *mp = Paddr2mptr(P, pltaddr); in Ppltdest()
63 if (P->status.pr_dmodel == PR_MODEL_LP64) { in Ppltdest()
68 if (Pread(P, &r, sizeof (r), r_addr) == sizeof (r) && in Ppltdest()
80 if (Pread(P, &r, sizeof (r), r_addr) == sizeof (r) && in Ppltdest()
93 Pissyscall(struct ps_prochandle *P, uintptr_t addr) in Pissyscall() argument
97 if (P->status.pr_dmodel == PR_MODEL_LP64) { in Pissyscall()
98 if (Pread(P, instr, sizeof (syscall_instr), addr) != in Pissyscall()
106 if (Pread(P, instr, sizeof (int_syscall_instr), addr) != in Pissyscall()
117 Pissyscall_prev(struct ps_prochandle *P, uintptr_t addr, uintptr_t *dst) in Pissyscall_prev() argument
121 if (P->status.pr_dmodel == PR_MODEL_LP64) { in Pissyscall_prev()
122 if (Pissyscall(P, addr - sizeof (syscall_instr))) { in Pissyscall_prev()
130 if ((ret = Pissyscall(P, addr - sizeof (int_syscall_instr))) != 0) { in Pissyscall_prev()
140 Pissyscall_text(struct ps_prochandle *P, const void *buf, size_t buflen) in Pissyscall_text() argument
142 if (P->status.pr_dmodel == PR_MODEL_LP64) { in Pissyscall_text()
178 argcount(struct ps_prochandle *P, uint32_t pc, ssize_t sz) in argcount() argument
188 if (Pread(P, instr, sizeof (instr), (uintptr_t)pc) != sizeof (instr)) in argcount()
236 Pstack_iter32(struct ps_prochandle *P, const prgregset_t regs, in Pstack_iter32() argument
271 init_uclist(&ucl, P); in Pstack_iter32()
282 (sz = Pread(P, &frame, sizeof (frame), (uintptr_t)fp) in Pstack_iter32()
291 argc = argcount(P, (uint32_t)frame.pc, sz); in Pstack_iter32()
330 Pread(P, &uc, sizeof (uc), uc_addr) == sizeof (uc)) { in Pstack_iter32()
355 read_args(struct ps_prochandle *P, uintptr_t fp, uintptr_t pc, prgreg_t *args, in read_args() argument
371 if (Pxlookup_by_addr(P, pc, NULL, 0, &sym, &si) != 0) in read_args()
374 if ((ctfp = Paddr_to_ctf(P, pc)) == NULL) in read_args()
423 if (Pread(P, ins, insnsize, sym.st_value) != insnsize) in read_args()
441 if (Pread(P, args, size, (fp - size)) != size) in read_args()
455 if (Pread(P, &args[regargs], size, fp + in read_args()
467 Pstack_iter(struct ps_prochandle *P, const prgregset_t regs, in Pstack_iter() argument
502 if (P->status.pr_dmodel != PR_MODEL_LP64) in Pstack_iter()
503 return (Pstack_iter32(P, regs, func, arg)); in Pstack_iter()
505 init_uclist(&ucl, P); in Pstack_iter()
517 Pread(P, &frame, sizeof (frame), (uintptr_t)fp) == in Pstack_iter()
522 if (Pread(P, &args, 2 * sizeof (prgreg_t), in Pstack_iter()
527 argc = read_args(P, fp, pc, args, in Pstack_iter()
548 if (Pread(P, &uc, sizeof (uc), uc_addr) in Pstack_iter()
566 Psyscall_setup(struct ps_prochandle *P, int nargs, int sysindex, uintptr_t sp) in Psyscall_setup() argument
568 if (P->status.pr_dmodel == PR_MODEL_ILP32) { in Psyscall_setup()
571 P->status.pr_lwp.pr_reg[REG_RAX] = sysindex; in Psyscall_setup()
572 P->status.pr_lwp.pr_reg[REG_RSP] = sp; in Psyscall_setup()
573 P->status.pr_lwp.pr_reg[REG_RIP] = P->sysaddr; in Psyscall_setup()
579 P->status.pr_lwp.pr_reg[REG_RAX] = sysindex; in Psyscall_setup()
580 P->status.pr_lwp.pr_reg[REG_RSP] = sp; in Psyscall_setup()
581 P->status.pr_lwp.pr_reg[REG_RIP] = P->sysaddr; in Psyscall_setup()
588 Psyscall_copyinargs(struct ps_prochandle *P, int nargs, argdes_t *argp, in Psyscall_copyinargs() argument
591 if (P->status.pr_dmodel == PR_MODEL_ILP32) { in Psyscall_copyinargs()
599 arglist[0] = P->status.pr_lwp.pr_reg[REG_RIP]; in Psyscall_copyinargs()
600 if (Pwrite(P, &arglist[0], sizeof (int) * (nargs+1), in Psyscall_copyinargs()
612 (void) Pputareg(P, REG_RDI, adp->arg_value); in Psyscall_copyinargs()
615 (void) Pputareg(P, REG_RSI, adp->arg_value); in Psyscall_copyinargs()
618 (void) Pputareg(P, REG_RDX, adp->arg_value); in Psyscall_copyinargs()
621 (void) Pputareg(P, REG_RCX, adp->arg_value); in Psyscall_copyinargs()
624 (void) Pputareg(P, REG_R8, adp->arg_value); in Psyscall_copyinargs()
627 (void) Pputareg(P, REG_R9, adp->arg_value); in Psyscall_copyinargs()
635 arglist[0] = P->status.pr_lwp.pr_reg[REG_RIP]; in Psyscall_copyinargs()
637 if (Pwrite(P, &arglist[0], in Psyscall_copyinargs()
647 Psyscall_copyoutargs(struct ps_prochandle *P, int nargs, argdes_t *argp, in Psyscall_copyoutargs() argument
650 if (P->status.pr_dmodel == PR_MODEL_ILP32) { in Psyscall_copyoutargs()
655 if (Pread(P, &arglist[0], sizeof (int) * (nargs+1), in Psyscall_copyoutargs()
668 Pread(P, &arglist[0], sizeof (int64_t) * (pusharg + 1), in Psyscall_copyoutargs()
676 P->status.pr_lwp.pr_reg[REG_RDI]; in Psyscall_copyoutargs()
680 P->status.pr_lwp.pr_reg[REG_RSI]; in Psyscall_copyoutargs()
684 P->status.pr_lwp.pr_reg[REG_RDX]; in Psyscall_copyoutargs()
688 P->status.pr_lwp.pr_reg[REG_RCX]; in Psyscall_copyoutargs()
692 P->status.pr_lwp.pr_reg[REG_R8]; in Psyscall_copyoutargs()
696 P->status.pr_lwp.pr_reg[REG_R9]; in Psyscall_copyoutargs()