blob: a45cb6894ad36c86c663ff77798c4b419db07c1f [file] [log] [blame]
Greg Ungerer230d1862009-03-16 22:07:39 +10001#ifndef _M68K_PTRACE_H
2#define _M68K_PTRACE_H
3
David Howells10b3a972012-10-09 09:47:06 +01004#include <uapi/asm/ptrace.h>
Greg Ungerer230d1862009-03-16 22:07:39 +10005
6#ifndef __ASSEMBLY__
Greg Ungerer230d1862009-03-16 22:07:39 +10007
8#ifndef PS_S
9#define PS_S (0x2000)
10#define PS_M (0x1000)
11#endif
12
13#define user_mode(regs) (!((regs)->sr & PS_S))
14#define instruction_pointer(regs) ((regs)->pc)
15#define profile_pc(regs) instruction_pointer(regs)
Al Virod878d6d2012-09-16 12:06:34 -040016#define current_pt_regs() \
17 (struct pt_regs *)((char *)current_thread_info() + THREAD_SIZE) - 1
Al Viro1ca97bb2012-11-18 12:50:10 -050018#define current_user_stack_pointer() rdusp()
Andreas Schwabfaa47b42009-05-10 21:14:52 +020019
Andreas Schwabfaa47b42009-05-10 21:14:52 +020020#define arch_has_single_step() (1)
Andreas Schwabfaa47b42009-05-10 21:14:52 +020021
Greg Ungererf60a5572009-07-07 15:54:54 +100022#ifdef CONFIG_MMU
Andreas Schwabfaa47b42009-05-10 21:14:52 +020023#define arch_has_block_step() (1)
Andreas Schwabfaa47b42009-05-10 21:14:52 +020024#endif
25
Greg Ungerer230d1862009-03-16 22:07:39 +100026#endif /* __ASSEMBLY__ */
27#endif /* _M68K_PTRACE_H */