diff options
Diffstat (limited to 'sysdeps/Linux/arm/regs.c')
-rw-r--r-- | sysdeps/Linux/arm/regs.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/sysdeps/Linux/arm/regs.c b/sysdeps/Linux/arm/regs.c index 92d1ca9..78ee60f 100644 --- a/sysdeps/Linux/arm/regs.c +++ b/sysdeps/Linux/arm/regs.c @@ -1,3 +1,7 @@ +#if HAVE_CONFIG_H +#include "config.h" +#endif + #include <sys/types.h> #include <sys/ptrace.h> #include <asm/ptrace.h> @@ -14,20 +18,20 @@ #define off_lr 56 #define off_sp 52 -int get_instruction_pointer(pid_t pid) +void * get_instruction_pointer(pid_t pid) { - return ptrace(PTRACE_PEEKUSER, pid, off_pc, 0); + return (void *)ptrace(PTRACE_PEEKUSER, pid, off_pc, 0); } -int get_stack_pointer(pid_t pid) +void * get_stack_pointer(pid_t pid) { - return ptrace(PTRACE_PEEKUSER, pid, off_sp, 0); + return (void *)ptrace(PTRACE_PEEKUSER, pid, off_sp, 0); } /* really, this is given the *stack_pointer expecting * a CISC architecture; in our case, we don't need that */ -int get_return_addr(pid_t pid, void * stack_pointer) +void * get_return_addr(pid_t pid, void * stack_pointer) { - return ptrace(PTRACE_PEEKUSER, pid, off_lr, 0); + return (void *)ptrace(PTRACE_PEEKUSER, pid, off_lr, 0); } |