linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / include / asm-frv / ptrace.h
index 7ff5251..b2cce07 100644 (file)
 #ifndef __ASSEMBLY__
 
 /*
- * we dedicate GR28 to keeping a pointer to the current exception frame
- * - gr28 is destroyed on entry to the kernel from userspace
+ * dedicate GR28; to keeping the a pointer to the current exception frame
  */
 register struct pt_regs *__frame asm("gr28");
+register struct pt_regs *__debug_frame asm("gr31");
+
+#ifndef container_of
+#define container_of(ptr, type, member) ({                     \
+        const typeof( ((type *)0)->member ) *__mptr = (ptr);   \
+        (type *)( (char *)__mptr - offsetof(type,member) );})
+#endif
+
+#define __debug_regs container_of(__debug_frame, struct pt_debug_regs, normal_regs)
 
 #define user_mode(regs)                        (!((regs)->psr & PSR_S))
 #define instruction_pointer(regs)      ((regs)->pc)