sparc: Remove old style signal frame support.
[cascardo/linux.git] / include / asm-sparc64 / ptrace.h
index 8617c3a..b4b951d 100644 (file)
@@ -8,6 +8,8 @@
  * stack during a system call and basically all traps.
  */
 
+#define PT_REGS_MAGIC 0x57ac6c00
+
 #ifndef __ASSEMBLY__
 
 struct pt_regs {
@@ -16,7 +18,19 @@ struct pt_regs {
        unsigned long tpc;
        unsigned long tnpc;
        unsigned int y;
-       unsigned int fprs;
+
+       /* We encode a magic number, PT_REGS_MAGIC, along
+        * with the %tt (trap type) register value at trap
+        * entry time.  The magic number allows us to identify
+        * accurately a trap stack frame in the stack
+        * unwinder, and the %tt value allows us to test
+        * things like "in a system call" etc. for an arbitray
+        * process.
+        *
+        * The PT_REGS_MAGIC is choosen such that it can be
+        * loaded completely using just a sethi instruction.
+        */
+       unsigned int magic;
 };
 
 struct pt_regs32 {
@@ -102,12 +116,14 @@ do {      current_thread_info()->syscall_noerror = 1; \
 } while (0)
 #define user_mode(regs) (!((regs)->tstate & TSTATE_PRIV))
 #define instruction_pointer(regs) ((regs)->tpc)
+#define regs_return_value(regs) ((regs)->u_regs[UREG_I0])
 #ifdef CONFIG_SMP
 extern unsigned long profile_pc(struct pt_regs *);
 #else
 #define profile_pc(regs) instruction_pointer(regs)
 #endif
 extern void show_regs(struct pt_regs *);
+extern void __show_regs(struct pt_regs *);
 #endif
 
 #else /* __ASSEMBLY__ */
@@ -145,7 +161,7 @@ extern void show_regs(struct pt_regs *);
 #define PT_V9_TPC    0x88
 #define PT_V9_TNPC   0x90
 #define PT_V9_Y      0x98
-#define PT_V9_FPRS   0x9c
+#define PT_V9_MAGIC  0x9c
 #define PT_TSTATE      PT_V9_TSTATE
 #define PT_TPC         PT_V9_TPC
 #define PT_TNPC                PT_V9_TNPC