0001
0002
0003
0004
0005
0006
0007
0008 #ifndef __ARC_KGDB_H__
0009 #define __ARC_KGDB_H__
0010
0011 #ifdef CONFIG_KGDB
0012
0013 #include <asm/ptrace.h>
0014
0015
0016
0017 #undef DBG_MAX_REG_NUM
0018
0019 #define GDB_MAX_REGS 87
0020
0021 #define BREAK_INSTR_SIZE 2
0022 #define CACHE_FLUSH_IS_SAFE 1
0023 #define NUMREGBYTES (GDB_MAX_REGS * 4)
0024 #define BUFMAX 2048
0025
0026 static inline void arch_kgdb_breakpoint(void)
0027 {
0028 __asm__ __volatile__ ("trap_s 0x4\n");
0029 }
0030
0031 extern void kgdb_trap(struct pt_regs *regs);
0032
0033
0034
0035
0036
0037 enum arc_linux_regnums {
0038 _R0 = 0,
0039 _R1, _R2, _R3, _R4, _R5, _R6, _R7, _R8, _R9, _R10, _R11, _R12, _R13,
0040 _R14, _R15, _R16, _R17, _R18, _R19, _R20, _R21, _R22, _R23, _R24,
0041 _R25, _R26,
0042 _FP = 27,
0043 __SP = 28,
0044 _R30 = 30,
0045 _BLINK = 31,
0046 _LP_COUNT = 60,
0047 _STOP_PC = 64,
0048 _RET = 64,
0049 _LP_START = 65,
0050 _LP_END = 66,
0051 _STATUS32 = 67,
0052 _ECR = 76,
0053 _BTA = 82,
0054 };
0055
0056 #else
0057 #define kgdb_trap(regs)
0058 #endif
0059
0060 #endif