0001
0002 #ifndef _ASM_X86_KGDB_H
0003 #define _ASM_X86_KGDB_H
0004
0005
0006
0007
0008
0009
0010 #include <asm/ptrace.h>
0011
0012
0013
0014
0015
0016
0017 #define BUFMAX 1024
0018
0019
0020
0021
0022
0023
0024
0025
0026 #ifdef CONFIG_X86_32
0027 enum regnames {
0028 GDB_AX,
0029 GDB_CX,
0030 GDB_DX,
0031 GDB_BX,
0032 GDB_SP,
0033 GDB_BP,
0034 GDB_SI,
0035 GDB_DI,
0036 GDB_PC,
0037 GDB_PS,
0038 GDB_CS,
0039 GDB_SS,
0040 GDB_DS,
0041 GDB_ES,
0042 GDB_FS,
0043 GDB_GS,
0044 };
0045 #define GDB_ORIG_AX 41
0046 #define DBG_MAX_REG_NUM 16
0047 #define NUMREGBYTES ((GDB_GS+1)*4)
0048 #else
0049 enum regnames {
0050 GDB_AX,
0051 GDB_BX,
0052 GDB_CX,
0053 GDB_DX,
0054 GDB_SI,
0055 GDB_DI,
0056 GDB_BP,
0057 GDB_SP,
0058 GDB_R8,
0059 GDB_R9,
0060 GDB_R10,
0061 GDB_R11,
0062 GDB_R12,
0063 GDB_R13,
0064 GDB_R14,
0065 GDB_R15,
0066 GDB_PC,
0067 GDB_PS,
0068 GDB_CS,
0069 GDB_SS,
0070 GDB_DS,
0071 GDB_ES,
0072 GDB_FS,
0073 GDB_GS,
0074 };
0075 #define GDB_ORIG_AX 57
0076 #define DBG_MAX_REG_NUM 24
0077
0078 #define NUMREGBYTES ((17 * 8) + (5 * 4))
0079 #endif
0080
0081 static inline void arch_kgdb_breakpoint(void)
0082 {
0083 asm(" int $3");
0084 }
0085 #define BREAK_INSTR_SIZE 1
0086 #define CACHE_FLUSH_IS_SAFE 1
0087 #define GDB_ADJUSTS_BREAK_OFFSET
0088
0089 extern int kgdb_ll_trap(int cmd, const char *str,
0090 struct pt_regs *regs, long err, int trap, int sig);
0091
0092 #endif