summaryrefslogtreecommitdiffstats
path: root/include/asm-sparc/ptrace.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1995-11-14 08:00:00 +0000
committer <ralf@linux-mips.org>1995-11-14 08:00:00 +0000
commite7c2a72e2680827d6a733931273a93461c0d8d1b (patch)
treec9abeda78ef7504062bb2e816bcf3e3c9d680112 /include/asm-sparc/ptrace.h
parentec6044459060a8c9ce7f64405c465d141898548c (diff)
Import of Linux/MIPS 1.3.0
Diffstat (limited to 'include/asm-sparc/ptrace.h')
-rw-r--r--include/asm-sparc/ptrace.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/asm-sparc/ptrace.h b/include/asm-sparc/ptrace.h
new file mode 100644
index 000000000..70fb8d5df
--- /dev/null
+++ b/include/asm-sparc/ptrace.h
@@ -0,0 +1,32 @@
+#ifndef _SPARC_PTRACE_H
+#define _SPARC_PTRACE_H
+
+/* I have not looked enough into how this should be done. Without playing
+ * lots of tricks to optimize I think we need to save the whole register
+ * window frame plus the floating-point registers. We'll see...
+ */
+
+/* this struct defines the way the registers are stored on the
+ stack during a system call. */
+
+struct pt_regs {
+ unsigned long ps; /* previous supervisor, same as alpha I believe */
+ unsigned long pc; /* current and next program counter */
+ unsigned long npc;
+ unsigned long sp; /* stack and frame pointer */
+ unsigned long fp;
+ unsigned long psr; /* for condition codes */
+ unsigned long nuwin; /* number of user windows */
+ /* not sure yet whether all regs are necessary
+ * but this is how it is traditionally done on the sparc.
+ */
+ unsigned long u_regs[24*16];
+ unsigned long f_regs[64]; /* yuck yuck yuck */
+};
+
+#ifdef __KERNEL__
+#define user_mode(regs) (0x0) /* if previous supervisor is 0, came from user */
+extern void show_regs(struct pt_regs *);
+#endif
+
+#endif