1 #ifndef _CRIS_ARCH_PTRACE_H
2 #define _CRIS_ARCH_PTRACE_H
6 #define CRIS_FRAME_NORMAL 0 /* normal frame without SBFS stacking */
7 #define CRIS_FRAME_BUSFAULT 1 /* frame stacked using SBFS, need RBF return
10 /* Register numbers in the ptrace system call interface */
12 #define PT_FRAMETYPE 0
31 #define PT_IRP 19 /* This is actually the debugged process' PC */
32 #define PT_CSRINSTR 20 /* CPU Status record remnants -
33 valid if frametype == busfault */
36 #define PT_USP 23 /* special case - USP is not in the pt_regs */
39 /* Condition code bit numbers. The same numbers apply to CCR of course,
40 but we use DCCR everywhere else, so let's try and be consistent. */
41 #define C_DCCR_BITNR 0
42 #define V_DCCR_BITNR 1
43 #define Z_DCCR_BITNR 2
44 #define N_DCCR_BITNR 3
45 #define X_DCCR_BITNR 4
46 #define I_DCCR_BITNR 5
47 #define B_DCCR_BITNR 6
48 #define M_DCCR_BITNR 7
49 #define U_DCCR_BITNR 8
50 #define P_DCCR_BITNR 9
51 #define F_DCCR_BITNR 10
53 /* pt_regs not only specifices the format in the user-struct during
54 * ptrace but is also the frame format used in the kernel prologue/epilogues
59 unsigned long frametype; /* type of stackframe */
60 unsigned long orig_r10;
61 /* pushed by movem r13, [sp] in SAVE_ALL, movem pushes backwards */
79 unsigned long irp; /* This is actually the debugged process' PC */
80 unsigned long csrinstr;
81 unsigned long csraddr;
82 unsigned long csrdata;
85 /* switch_stack is the extra stuff pushed onto the stack in _resume (entry.S)
86 * when doing a context-switch. it is used (apart from in resume) when a new
87 * thread is made and we need to make _resume (which is starting it for the
88 * first time) realise what is going on.
90 * Actually, the use is very close to the thread struct (TSS) in that both the
91 * switch_stack and the TSS are used to keep thread stuff when switching in
106 unsigned long return_ip; /* ip that _resume will return to */
111 /* bit 8 is user-mode flag */
112 #define user_mode(regs) (((regs)->dccr & 0x100) != 0)
113 #define instruction_pointer(regs) ((regs)->irp)
114 #define profile_pc(regs) instruction_pointer(regs)
115 extern void show_regs(struct pt_regs *);
117 #endif /* __KERNEL__ */