2005-04-16 15:20:36 -07:00
|
|
|
#ifndef _ASMAXP_PTRACE_H
|
|
|
|
#define _ASMAXP_PTRACE_H
|
|
|
|
|
2012-12-17 13:47:09 +00:00
|
|
|
#include <uapi/asm/ptrace.h>
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-11-07 00:59:47 -08:00
|
|
|
|
2010-03-10 15:22:47 -08:00
|
|
|
#define arch_has_single_step() (1)
|
2005-04-16 15:20:36 -07:00
|
|
|
#define user_mode(regs) (((regs)->ps & 8) != 0)
|
|
|
|
#define instruction_pointer(regs) ((regs)->pc)
|
|
|
|
#define profile_pc(regs) instruction_pointer(regs)
|
2012-11-18 12:50:10 -05:00
|
|
|
#define current_user_stack_pointer() rdusp()
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-01-12 01:05:37 -08:00
|
|
|
#define task_pt_regs(task) \
|
2006-01-12 01:05:36 -08:00
|
|
|
((struct pt_regs *) (task_stack_page(task) + 2*PAGE_SIZE) - 1)
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2012-08-19 14:40:59 +12:00
|
|
|
#define current_pt_regs() \
|
|
|
|
((struct pt_regs *) ((char *)current_thread_info() + 2*PAGE_SIZE) - 1)
|
2012-11-05 13:00:27 -05:00
|
|
|
#define signal_pt_regs current_pt_regs
|
2012-08-19 14:40:59 +12:00
|
|
|
|
|
|
|
#define force_successful_syscall_return() (current_pt_regs()->r0 = 0)
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-12-20 10:04:10 +08:00
|
|
|
static inline unsigned long regs_return_value(struct pt_regs *regs)
|
|
|
|
{
|
|
|
|
return regs->r0;
|
|
|
|
}
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
#endif
|