void ptrace_arch_set_pc(unsigned long pc) { _read_greg(); memcpy(_target.reg + 34 * sizeof(unsigned long int), &pc, sizeof(unsigned long)); _write_greg(); }
void ptrace_arch_set_pc(unsigned long pc) { _read_greg(); memcpy(_target.reg + offsetof(struct reg, pc), &pc, sizeof(unsigned long)); _write_greg(); }
void ptrace_arch_get_syscall(void *id, void *arg1, void *arg2, void *arg3, void *arg4, void *ret) { _read_greg(); memcpy(id, _target.reg + offsetof(struct user, regs.orig_eax), sizeof(unsigned long)); memcpy(arg1, _target.reg + offsetof(struct user, regs.ebx), sizeof(unsigned long)); memcpy(arg2, _target.reg + offsetof(struct user, regs.ecx), sizeof(unsigned long)); memcpy(arg3, _target.reg + offsetof(struct user, regs.edx), sizeof(unsigned long)); memcpy(arg4, _target.reg + offsetof(struct user, regs.esi), sizeof(unsigned long)); memcpy(ret, _target.reg + offsetof(struct user, regs.eax), sizeof(unsigned long)); }
void ptrace_arch_get_syscall(void *id, void *arg1, void *arg2, void *arg3, void *arg4, void *ret) { _read_greg(); }
void ptrace_arch_get_pc(unsigned long *pc) { _read_greg(); memcpy(pc, _target.reg + offsetof(struct reg, pc), sizeof(unsigned long)); }
void ptrace_arch_set_pc(pid_t tid, unsigned long pc) { _read_greg(tid); memcpy(_target.reg + 37 * sizeof(register_t), &pc, sizeof(register_t)); _write_greg(tid); }
void ptrace_arch_get_pc(pid_t tid, unsigned long *pc) { _read_greg(tid); memcpy(pc, _target.reg + 37 * sizeof(register_t), sizeof(register_t)); }
void ptrace_arch_get_pc(unsigned long *pc) { _read_greg(); memcpy(pc, _target.reg + 34 * sizeof(unsigned long int), sizeof(unsigned long)); }