1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 #ifndef _CRIS_ARCH_PTRACE_H
3 #define _CRIS_ARCH_PTRACE_H
5 /* Register numbers in the ptrace system call interface */
28 #define PT_ERP 21 /* This is actually the debugged process' PC */
31 #define PT_USP 24 /* special case - USP is not in the pt_regs */
32 #define PT_PPC 25 /* special case - pseudo PC */
33 #define PT_BP 26 /* Base number for BP registers. */
34 #define PT_BP_CTRL 26 /* BP control register. */
37 /* Condition code bit numbers. */
48 #define M_CCS_BITNR 30
49 #define Q_CCS_BITNR 31
50 #define CCS_SHIFT 10 /* Shift count for each level in CCS */
52 /* pt_regs not only specifices the format in the user-struct during
53 * ptrace but is also the frame format used in the kernel prologue/epilogues
58 unsigned long orig_r10;
59 /* pushed by movem r13, [sp] in SAVE_ALL. */
80 unsigned long erp; /* This is actually the debugged process' PC */
81 /* For debugging purposes; saved only when needed. */
86 /* switch_stack is the extra stuff pushed onto the stack in _resume (entry.S)
87 * when doing a context-switch. it is used (apart from in resume) when a new
88 * thread is made and we need to make _resume (which is starting it for the
89 * first time) realise what is going on.
91 * Actually, the use is very close to the thread struct (TSS) in that both the
92 * switch_stack and the TSS are used to keep thread stuff when switching in
107 unsigned long return_ip; /* ip that _resume will return to */
112 #define arch_has_single_step() (1)
113 #define user_mode(regs) (((regs)->ccs & (1 << (U_CCS_BITNR + CCS_SHIFT))) != 0)
114 #define instruction_pointer(regs) ((regs)->erp)
115 #define profile_pc(regs) instruction_pointer(regs)
117 #endif /* __KERNEL__ */