patch-1.3.48 linux/include/asm-mips/ptrace.h

Next file: linux/include/asm-mips/reg.h
Previous file: linux/include/asm-mips/processor.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.47/linux/include/asm-mips/ptrace.h linux/include/asm-mips/ptrace.h
@@ -1,34 +1,29 @@
 /*
  * linux/include/asm-mips/ptrace.h
  *
- * machine dependent structs and defines to help the user use
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 1994, 1995 by Waldorf GMBH
+ * written by Ralf Baechle
+ *
+ * Machine dependent structs and defines to help the user use
  * the ptrace system call.
  */
 #ifndef __ASM_MIPS_PTRACE_H
 #define __ASM_MIPS_PTRACE_H
 
 /*
- * use ptrace (3 or 6, pid, PT_EXCL, data); to read or write
- * the processes registers.
- *
- * This defines/structures correspond to the register layout on stack -
- * if the order here is changed, it needs to be updated in
- * arch/mips/fork.c:copy_process, asm/mips/signal.c:do_signal,
- * asm-mips/ptrace.c, include/asm-mips/ptrace.h.
- */
-
-#include <asm/stackframe.h>
-
-/*
- * This struct defines the way the registers are stored on the 
- * stack during a system call/exception. As usual the registers
- * k0/k1 aren't being saved.
+ * This struct defines the way the registers are stored on the stack during a
+ * system call/exception. As usual the registers k0/k1 aren't being saved.
  */
 struct pt_regs {
 	/*
 	 * Pad bytes for argument save space on the stack
+	 * 20/40 Bytes for 32/64 bit code
 	 */
-	unsigned long pad0[FR_REG1/sizeof(unsigned long)];
+	unsigned long pad0[5];
 
 	/*
 	 * saved main processor registers
@@ -56,19 +51,26 @@
 	 */
 	unsigned long interrupt;
 	long orig_reg2;
+	long pad1;
 };
 
+#ifdef __KERNEL__
+
 /*
  * Does the process account for user or for system time?
  */
 #if defined (__R4000__)
 
-#define user_mode(regs) (!((regs)->cp0_status & 0x18))
+#define user_mode(regs) ((regs)->cp0_status & 0x10)
 
 #else /* !defined (__R4000__) */
 
-#error "#define user_mode(regs) for R3000!"
+#define user_mode(regs) (!((regs)->cp0_status & 0x8))
 
 #endif /* !defined (__R4000__) */
+
+#define instruction_pointer(regs) ((regs)->cp0_epc)
+extern void show_regs(struct pt_regs *);
+#endif
 
 #endif /* __ASM_MIPS_PTRACE_H */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this