aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-parisc/ptrace.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-parisc/ptrace.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/asm-parisc/ptrace.h')
-rw-r--r--include/asm-parisc/ptrace.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/include/asm-parisc/ptrace.h b/include/asm-parisc/ptrace.h
new file mode 100644
index 000000000000..3f428aa371a4
--- /dev/null
+++ b/include/asm-parisc/ptrace.h
@@ -0,0 +1,56 @@
1#ifndef _PARISC_PTRACE_H
2#define _PARISC_PTRACE_H
3
4/* written by Philipp Rumpf, Copyright (C) 1999 SuSE GmbH Nuernberg
5** Copyright (C) 2000 Grant Grundler, Hewlett-Packard
6*/
7
8#include <linux/types.h>
9
10/* This struct defines the way the registers are stored on the
11 * stack during a system call.
12 *
13 * N.B. gdb/strace care about the size and offsets within this
14 * structure. If you change things, you may break object compatibility
15 * for those applications.
16 */
17
18struct pt_regs {
19 unsigned long gr[32]; /* PSW is in gr[0] */
20 __u64 fr[32];
21 unsigned long sr[ 8];
22 unsigned long iasq[2];
23 unsigned long iaoq[2];
24 unsigned long cr27;
25 unsigned long pad0; /* available for other uses */
26 unsigned long orig_r28;
27 unsigned long ksp;
28 unsigned long kpc;
29 unsigned long sar; /* CR11 */
30 unsigned long iir; /* CR19 */
31 unsigned long isr; /* CR20 */
32 unsigned long ior; /* CR21 */
33 unsigned long ipsw; /* CR22 */
34};
35
36#define task_regs(task) ((struct pt_regs *) ((char *)(task) + TASK_REGS))
37/*
38 * The numbers chosen here are somewhat arbitrary but absolutely MUST
39 * not overlap with any of the number assigned in <linux/ptrace.h>.
40 *
41 * These ones are taken from IA-64 on the assumption that theirs are
42 * the most correct (and we also want to support PTRACE_SINGLEBLOCK
43 * since we have taken branch traps too)
44 */
45#define PTRACE_SINGLEBLOCK 12 /* resume execution until next branch */
46#ifdef __KERNEL__
47
48/* XXX should we use iaoq[1] or iaoq[0] ? */
49#define user_mode(regs) (((regs)->iaoq[0] & 3) ? 1 : 0)
50#define user_space(regs) (((regs)->iasq[1] != 0) ? 1 : 0)
51#define instruction_pointer(regs) ((regs)->iaoq[0] & ~3)
52#define profile_pc(regs) instruction_pointer(regs)
53extern void show_regs(struct pt_regs *);
54#endif
55
56#endif