Greg Ungerer | 230d186 | 2009-03-16 22:07:39 +1000 | [diff] [blame] | 1 | #ifndef _M68K_PTRACE_H |
| 2 | #define _M68K_PTRACE_H |
| 3 | |
David Howells | 10b3a97 | 2012-10-09 09:47:06 +0100 | [diff] [blame] | 4 | #include <uapi/asm/ptrace.h> |
Greg Ungerer | 230d186 | 2009-03-16 22:07:39 +1000 | [diff] [blame] | 5 | |
| 6 | #ifndef __ASSEMBLY__ |
Greg Ungerer | 230d186 | 2009-03-16 22:07:39 +1000 | [diff] [blame] | 7 | |
| 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 Viro | d878d6d | 2012-09-16 12:06:34 -0400 | [diff] [blame] | 16 | #define current_pt_regs() \ |
| 17 | (struct pt_regs *)((char *)current_thread_info() + THREAD_SIZE) - 1 |
Al Viro | 1ca97bb | 2012-11-18 12:50:10 -0500 | [diff] [blame] | 18 | #define current_user_stack_pointer() rdusp() |
Andreas Schwab | faa47b4 | 2009-05-10 21:14:52 +0200 | [diff] [blame] | 19 | |
Andreas Schwab | faa47b4 | 2009-05-10 21:14:52 +0200 | [diff] [blame] | 20 | #define arch_has_single_step() (1) |
Andreas Schwab | faa47b4 | 2009-05-10 21:14:52 +0200 | [diff] [blame] | 21 | |
Greg Ungerer | f60a557 | 2009-07-07 15:54:54 +1000 | [diff] [blame] | 22 | #ifdef CONFIG_MMU |
Andreas Schwab | faa47b4 | 2009-05-10 21:14:52 +0200 | [diff] [blame] | 23 | #define arch_has_block_step() (1) |
Andreas Schwab | faa47b4 | 2009-05-10 21:14:52 +0200 | [diff] [blame] | 24 | #endif |
| 25 | |
Greg Ungerer | 230d186 | 2009-03-16 22:07:39 +1000 | [diff] [blame] | 26 | #endif /* __ASSEMBLY__ */ |
| 27 | #endif /* _M68K_PTRACE_H */ |