blob: df9a6cd748d500e4cf4d394b0c0b24fc4a4c955c [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _ASMAXP_PTRACE_H
2#define _ASMAXP_PTRACE_H
3
David Howells96433f6e2012-12-17 13:47:09 +00004#include <uapi/asm/ptrace.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07005
Christoph Hellwig481bed42005-11-07 00:59:47 -08006
Christoph Hellwigfd341ab2010-03-10 15:22:47 -08007#define arch_has_single_step() (1)
Linus Torvalds1da177e2005-04-16 15:20:36 -07008#define user_mode(regs) (((regs)->ps & 8) != 0)
9#define instruction_pointer(regs) ((regs)->pc)
10#define profile_pc(regs) instruction_pointer(regs)
Linus Torvalds1da177e2005-04-16 15:20:36 -070011
akpm@osdl.orge52f4ca2006-01-12 01:05:37 -080012#define task_pt_regs(task) \
Al Viro27f45132006-01-12 01:05:36 -080013 ((struct pt_regs *) (task_stack_page(task) + 2*PAGE_SIZE) - 1)
Linus Torvalds1da177e2005-04-16 15:20:36 -070014
Al Virobe53db62012-08-19 14:40:59 +120015#define current_pt_regs() \
16 ((struct pt_regs *) ((char *)current_thread_info() + 2*PAGE_SIZE) - 1)
Al Viro22062a92012-11-05 13:00:27 -050017#define signal_pt_regs current_pt_regs
Al Virobe53db62012-08-19 14:40:59 +120018
19#define force_successful_syscall_return() (current_pt_regs()->r0 = 0)
Linus Torvalds1da177e2005-04-16 15:20:36 -070020
21#endif