Lines Matching refs:proc
49 get_arch_dep(struct process *proc) in get_arch_dep() argument
53 if (!proc->arch_ptr) in get_arch_dep()
54 proc->arch_ptr = (void *)malloc(sizeof(proc_archdep)); in get_arch_dep()
55 a = (proc_archdep *) (proc->arch_ptr); in get_arch_dep()
56 a->valid = (ptrace(PTRACE_GETREGS, proc->pid, 0, &a->regs) >= 0); in get_arch_dep()
65 syscall_p(struct process *proc, int status, int *sysnum) in syscall_p() argument
68 && WSTOPSIG(status) == (SIGTRAP | proc->tracesysgood)) { in syscall_p()
70 if (arm_get_register(proc, ARM_REG_PC, &pc) < 0 in syscall_p()
71 || arm_get_register(proc, ARM_REG_IP, &ip) < 0) in syscall_p()
77 unsigned insn = ptrace(PTRACE_PEEKTEXT, proc->pid, in syscall_p()
84 if (arm_get_register(proc, ARM_REG_R7, &r7) < 0) in syscall_p()
96 output_line(proc, "unexpected instruction 0x%x at %p", in syscall_p()
133 arm_get_next_pcs(struct process *proc, in arm_get_next_pcs() argument
138 if (proc_read_32(proc, pc, &this_instr) < 0 in arm_get_next_pcs()
139 || arm_get_register(proc, ARM_REG_CPSR, &status) < 0) in arm_get_next_pcs()
196 if (arm_get_register_offpc(proc, reg, &tmp) < 0) in arm_get_next_pcs()
204 (proc, BITS(this_instr, 16, 19), &operand1) < 0) in arm_get_next_pcs()
217 (proc, this_instr, c, pc, &operand2) < 0) in arm_get_next_pcs()
299 (proc, BITS(this_instr, 16, 19), &base) < 0) in arm_get_next_pcs()
308 (proc, this_instr, c, in arm_get_next_pcs()
323 if (proc_read_32(proc, (arch_addr_t)base, &next) < 0) in arm_get_next_pcs()
338 if (arm_get_register(proc, rn, &rn_val) < 0) in arm_get_next_pcs()
357 if (proc_read_32(proc, addr, &next) < 0) in arm_get_next_pcs()
394 thumb_get_next_pcs(struct process *proc, in thumb_get_next_pcs() argument
399 if (proc_read_16(proc, pc, &inst1) < 0 in thumb_get_next_pcs()
400 || arm_get_register(proc, ARM_REG_CPSR, &status) < 0) in thumb_get_next_pcs()
418 if (arm_get_register(proc, ARM_REG_SP, &sp) < 0 in thumb_get_next_pcs()
419 || proc_read_32(proc, (arch_addr_t)(sp + offset), in thumb_get_next_pcs()
434 if (proc_read_16(proc, pc + 2, &inst2) < 0) in thumb_get_next_pcs()
465 if (arm_get_register(proc, ARM_REG_LR, in thumb_get_next_pcs()
515 if (arm_get_register(proc, rn, &addr) < 0) in thumb_get_next_pcs()
519 if (proc_read_32(proc, a, &next) < 0) in thumb_get_next_pcs()
529 if (arm_get_register(proc, rn, &next) < 0) in thumb_get_next_pcs()
538 if (arm_get_register(proc, rn, &base) < 0) in thumb_get_next_pcs()
561 if (arm_get_register(proc, rm, &v) < 0) in thumb_get_next_pcs()
572 if (proc_read_32(proc, in thumb_get_next_pcs()
588 else if (arm_get_register(proc, tbl_reg, &table) < 0) in thumb_get_next_pcs()
592 if (arm_get_register(proc, off_reg, &offset) < 0) in thumb_get_next_pcs()
598 if (proc_read_8(proc, (arch_addr_t)table, &length) < 0) in thumb_get_next_pcs()
614 else if (arm_get_register(proc, tbl_reg, &table) < 0) in thumb_get_next_pcs()
618 if (arm_get_register(proc, off_reg, &offset) < 0) in thumb_get_next_pcs()
624 if (proc_read_16(proc, (arch_addr_t)table, &length) < 0) in thumb_get_next_pcs()
639 arch_sw_singlestep(struct process *proc, struct breakpoint *sbp, in arch_sw_singlestep() argument
643 const arch_addr_t pc = get_instruction_pointer(proc); in arch_sw_singlestep()
646 if (arm_get_register(proc, ARM_REG_CPSR, &cpsr) < 0) in arch_sw_singlestep()
652 : &arm_get_next_pcs)(proc, pc, next_pcs) < 0) in arch_sw_singlestep()
665 ptrace(PTRACE_CONT, proc->pid, 0, 0); in arch_sw_singlestep()
670 arch_type_sizeof(struct process *proc, struct arg_type_info *info) in arch_type_sizeof() argument
672 if (proc == NULL) in arch_type_sizeof()
710 arch_type_alignof(struct process *proc, struct arg_type_info *info) in arch_type_alignof() argument
712 return arch_type_sizeof(proc, info); in arch_type_alignof()