--- a/sysdeps/linux-gnu/ppc/ptrace.h +++ b/sysdeps/linux-gnu/ppc/ptrace.h @@ -18,4 +18,5 @@ * 02110-1301 USA */ +#include #include --- a/sysdeps/linux-gnu/ppc/regs.c +++ b/sysdeps/linux-gnu/ppc/regs.c @@ -23,11 +23,14 @@ #include "config.h" +#include #include #include #include #include +#ifdef HAVE_ERROR_H #include +#endif #include "proc.h" #include "common.h" @@ -49,8 +52,11 @@ get_instruction_pointer(struct process * void set_instruction_pointer(struct process *proc, void *addr) { - if (ptrace(PTRACE_POKEUSER, proc->pid, sizeof(long)*PT_NIP, addr) != 0) - error(0, errno, "set_instruction_pointer"); + if (ptrace(PTRACE_POKEUSER, proc->pid, sizeof(long)*PT_NIP, addr) != 0){ + report_global_error("%s: set_instruction_pointer", + strerror(errno)); + exit(1); + } } void *