patch-2.4.7 linux/include/asm-cris/ptrace.h

Next file: linux/include/asm-cris/semaphore.h
Previous file: linux/include/asm-cris/mmu_context.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.6/linux/include/asm-cris/ptrace.h linux/include/asm-cris/ptrace.h
@@ -22,8 +22,9 @@
 #define PT_MOF       16
 #define PT_DCCR      17
 #define PT_SRP       18
-#define PT_IRP       19
-#define PT_CSRINSTR  20    /* CPU Status record remnants - valid if frametype == busfault */
+#define PT_IRP       19    /* This is actually the debugged process' PC */
+#define PT_CSRINSTR  20    /* CPU Status record remnants -
+			      valid if frametype == busfault */
 #define PT_CSRADDR   21
 #define PT_CSRDATA   22
 #define PT_USP       23    /* special case - USP is not in the pt_regs */
@@ -31,12 +32,9 @@
 
 /* Frame types */
 
-#define CRIS_FRAME_NORMAL   0  /* normal frame without SBFS stacking */
-#define CRIS_FRAME_BUSFAULT 1  /* frame stacked using SBFS, need RBF return path */
-
-/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
-#define PTRACE_GETREGS            12
-#define PTRACE_SETREGS            13
+#define CRIS_FRAME_NORMAL   0 /* normal frame without SBFS stacking */
+#define CRIS_FRAME_BUSFAULT 1 /* frame stacked using SBFS, need RBF return
+				 path */
 
 /* pt_regs not only specifices the format in the user-struct during
  * ptrace but is also the frame format used in the kernel prologue/epilogues 
@@ -47,10 +45,10 @@
 	unsigned long frametype;  /* type of stackframe */
 	unsigned long orig_r10;
 	/* pushed by movem r13, [sp] in SAVE_ALL, movem pushes backwards */
-	unsigned long r13; /* 8 */
-	unsigned long r12; /* 12 */
-	unsigned long r11; /* 16 */
-	unsigned long r10; /* 20 */
+	unsigned long r13;
+	unsigned long r12;
+	unsigned long r11;
+	unsigned long r10;
 	unsigned long r9;
 	unsigned long r8;
 	unsigned long r7;
@@ -64,20 +62,21 @@
 	unsigned long mof;
 	unsigned long dccr;
 	unsigned long srp;
-	unsigned long irp;
+	unsigned long irp; /* This is actually the debugged process' PC */
 	unsigned long csrinstr;
 	unsigned long csraddr;
 	unsigned long csrdata;
 };
 
-/* switch_stack is the extra stuff pushed onto the stack in _resume (entry.S) when
-   doing a context-switch. it is used (apart from in resume) when a new thread is made 
-   and we need to make _resume (which is starting it for the first time) realise what
-   is going on. 
-
-   actually, the use is very close to the thread struct (TSS) in that both the switch_stack
-   and the TSS are used to keep thread stuff when switching in _resume.
-*/
+/* switch_stack is the extra stuff pushed onto the stack in _resume (entry.S)
+ * when doing a context-switch. it is used (apart from in resume) when a new
+ * thread is made and we need to make _resume (which is starting it for the
+ * first time) realise what is going on.
+ *
+ * Actually, the use is very close to the thread struct (TSS) in that both the
+ * switch_stack and the TSS are used to keep thread stuff when switching in
+ * _resume.
+ */
 
 struct switch_stack {
 	unsigned long r9;
@@ -94,6 +93,10 @@
 };
 
 #ifdef __KERNEL__
+/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
+#define PTRACE_GETREGS            12
+#define PTRACE_SETREGS            13
+
 /* bit 8 is user-mode flag */
 #define user_mode(regs) ((regs)->dccr & 0x100)
 #define instruction_pointer(regs) ((regs)->irp)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)