• Home
  • Raw
  • Download

Lines Matching refs:proc

34 static int allocate_gpr(struct fetch_context *ctx, struct process *proc,
69 fetch_context_init(struct process *proc, struct fetch_context *context) in fetch_context_init() argument
74 if (proc->e_machine == EM_PPC) in fetch_context_init()
75 context->stack_pointer = proc->stack_pointer + 8; in fetch_context_init()
77 context->stack_pointer = proc->stack_pointer + 112; in fetch_context_init()
85 if (proc->e_machine == EM_PPC64) { in fetch_context_init()
86 if (ptrace(PTRACE_GETREGS64, proc->pid, 0, in fetch_context_init()
91 if (ptrace(PTRACE_GETREGS, proc->pid, 0, in fetch_context_init()
98 if (ptrace(PTRACE_GETREGS, proc->pid, 0, in fetch_context_init()
104 if (ptrace(PTRACE_GETFPREGS, proc->pid, 0, &context->fpregs) < 0) in fetch_context_init()
111 arch_fetch_arg_init(enum tof type, struct process *proc, in arch_fetch_arg_init() argument
116 || fetch_context_init(proc, context) < 0) { in arch_fetch_arg_init()
135 arch_fetch_arg_clone(struct process *proc, in arch_fetch_arg_clone() argument
146 allocate_stack_slot(struct fetch_context *ctx, struct process *proc, in allocate_stack_slot() argument
149 size_t sz = type_sizeof(proc, info); in allocate_stack_slot()
153 size_t a = type_alignof(proc, info); in allocate_stack_slot()
155 if (proc->e_machine == EM_PPC && a < 4) in allocate_stack_slot()
157 else if (proc->e_machine == EM_PPC64 && a < 8) in allocate_stack_slot()
173 read_gpr(struct fetch_context *ctx, struct process *proc, int reg_num) in read_gpr() argument
175 if (proc->e_machine == EM_PPC) in read_gpr()
218 allocate_gpr(struct fetch_context *ctx, struct process *proc, in allocate_gpr() argument
222 return allocate_stack_slot(ctx, proc, info, valuep); in allocate_gpr()
228 size_t sz = type_sizeof(proc, info); in allocate_gpr()
240 u.i64 = read_gpr(ctx, proc, reg_num); in allocate_gpr()
241 if (proc->e_machine == EM_PPC) in allocate_gpr()
248 allocate_float(struct fetch_context *ctx, struct process *proc, in allocate_float() argument
251 int pool = proc->e_machine == EM_PPC64 ? 13 : 8; in allocate_float()
260 if (proc->e_machine == EM_PPC64) in allocate_float()
261 allocate_gpr(ctx, proc, info, NULL); in allocate_float()
275 return allocate_stack_slot(ctx, proc, info, valuep); in allocate_float()
279 allocate_argument(struct fetch_context *ctx, struct process *proc, in allocate_argument() argument
290 return allocate_float(ctx, proc, info, valuep); in allocate_argument()
293 if (proc->e_machine == EM_PPC) { in allocate_argument()
322 unsigned width = proc->e_machine == EM_PPC64 ? 8 : 4; in allocate_argument()
326 size_t sz = type_sizeof(proc, valuep->type); in allocate_argument()
338 value_init(&val, proc, NULL, long_info, 0); in allocate_argument()
349 rc = allocate_float(ctx, proc, fp_info, &val); in allocate_argument()
351 rc = allocate_gpr(ctx, proc, long_info, &val); in allocate_argument()
403 struct process *proc, in arch_fetch_arg_next() argument
406 return allocate_argument(ctx, proc, info, valuep); in arch_fetch_arg_next()
411 struct process *proc, struct arg_type_info *info, in arch_fetch_retval() argument
417 uint64_t addr = read_gpr(ctx, proc, 3); in arch_fetch_retval()
418 value_init(valuep, proc, NULL, info, 0); in arch_fetch_retval()
427 if (fetch_context_init(proc, ctx) < 0) in arch_fetch_retval()
429 return allocate_argument(ctx, proc, info, valuep); in arch_fetch_retval()