2024-09-09 08:52:07 +00:00
|
|
|
#ifndef _ASMAXP_PTRACE_H
|
|
|
|
#define _ASMAXP_PTRACE_H
|
|
|
|
|
2024-09-09 08:57:42 +00:00
|
|
|
#include <uapi/asm/ptrace.h>
|
2024-09-09 08:52:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
#define arch_has_single_step() (1)
|
|
|
|
#define user_mode(regs) (((regs)->ps & 8) != 0)
|
|
|
|
#define instruction_pointer(regs) ((regs)->pc)
|
|
|
|
#define profile_pc(regs) instruction_pointer(regs)
|
2024-09-09 08:57:42 +00:00
|
|
|
#define current_user_stack_pointer() rdusp()
|
2024-09-09 08:52:07 +00:00
|
|
|
|
|
|
|
#define task_pt_regs(task) \
|
|
|
|
((struct pt_regs *) (task_stack_page(task) + 2*PAGE_SIZE) - 1)
|
|
|
|
|
2024-09-09 08:57:42 +00:00
|
|
|
#define current_pt_regs() \
|
|
|
|
((struct pt_regs *) ((char *)current_thread_info() + 2*PAGE_SIZE) - 1)
|
|
|
|
#define signal_pt_regs current_pt_regs
|
2024-09-09 08:52:07 +00:00
|
|
|
|
2024-09-09 08:57:42 +00:00
|
|
|
#define force_successful_syscall_return() (current_pt_regs()->r0 = 0)
|
|
|
|
|
|
|
|
static inline unsigned long regs_return_value(struct pt_regs *regs)
|
|
|
|
{
|
|
|
|
return regs->r0;
|
|
|
|
}
|
2024-09-09 08:52:07 +00:00
|
|
|
|
|
|
|
#endif
|