Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* written by Philipp Rumpf, Copyright (C) 1999 SuSE GmbH Nuernberg |
| 2 | ** Copyright (C) 2000 Grant Grundler, Hewlett-Packard |
| 3 | */ |
David Howells | 70c1674 | 2012-10-16 21:28:05 +0100 | [diff] [blame] | 4 | #ifndef _PARISC_PTRACE_H |
| 5 | #define _PARISC_PTRACE_H |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6 | |
David Howells | 70c1674 | 2012-10-16 21:28:05 +0100 | [diff] [blame] | 7 | #include <uapi/asm/ptrace.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | |
Adrian Bunk | f22ab81 | 2008-07-25 01:47:34 -0700 | [diff] [blame] | 10 | #define task_regs(task) ((struct pt_regs *) ((char *)(task) + TASK_REGS)) |
| 11 | |
Helge Deller | 81e192d | 2008-10-17 18:48:36 +0000 | [diff] [blame] | 12 | #define arch_has_single_step() 1 |
Helge Deller | 81e192d | 2008-10-17 18:48:36 +0000 | [diff] [blame] | 13 | #define arch_has_block_step() 1 |
Helge Deller | 81e192d | 2008-10-17 18:48:36 +0000 | [diff] [blame] | 14 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 | /* XXX should we use iaoq[1] or iaoq[0] ? */ |
| 16 | #define user_mode(regs) (((regs)->iaoq[0] & 3) ? 1 : 0) |
| 17 | #define user_space(regs) (((regs)->iasq[1] != 0) ? 1 : 0) |
| 18 | #define instruction_pointer(regs) ((regs)->iaoq[0] & ~3) |
Kyle McMartin | 40e03b6 | 2009-07-05 15:59:56 -0400 | [diff] [blame] | 19 | #define user_stack_pointer(regs) ((regs)->gr[30]) |
Randolph Chung | 5cd55b0 | 2005-10-21 22:42:18 -0400 | [diff] [blame] | 20 | unsigned long profile_pc(struct pt_regs *); |
Kyle McMartin | 40e03b6 | 2009-07-05 15:59:56 -0400 | [diff] [blame] | 21 | |
| 22 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 23 | #endif |