1#ifndef _ASM_X86_KGDB_H
2#define _ASM_X86_KGDB_H
3
4
5
6
7
8
9#include <asm/ptrace.h>
10
11
12
13
14
15
16#define BUFMAX 1024
17
18
19
20
21
22
23
24
25#ifdef CONFIG_X86_32
26enum regnames {
27 GDB_AX,
28 GDB_CX,
29 GDB_DX,
30 GDB_BX,
31 GDB_SP,
32 GDB_BP,
33 GDB_SI,
34 GDB_DI,
35 GDB_PC,
36 GDB_PS,
37 GDB_CS,
38 GDB_SS,
39 GDB_DS,
40 GDB_ES,
41 GDB_FS,
42 GDB_GS,
43};
44#define GDB_ORIG_AX 41
45#define DBG_MAX_REG_NUM 16
46#define NUMREGBYTES ((GDB_GS+1)*4)
47#else
48enum regnames {
49 GDB_AX,
50 GDB_BX,
51 GDB_CX,
52 GDB_DX,
53 GDB_SI,
54 GDB_DI,
55 GDB_BP,
56 GDB_SP,
57 GDB_R8,
58 GDB_R9,
59 GDB_R10,
60 GDB_R11,
61 GDB_R12,
62 GDB_R13,
63 GDB_R14,
64 GDB_R15,
65 GDB_PC,
66 GDB_PS,
67 GDB_CS,
68 GDB_SS,
69 GDB_DS,
70 GDB_ES,
71 GDB_FS,
72 GDB_GS,
73};
74#define GDB_ORIG_AX 57
75#define DBG_MAX_REG_NUM 24
76
77#define NUMREGBYTES ((17 * 8) + (5 * 4))
78#endif
79
80static inline void arch_kgdb_breakpoint(void)
81{
82 asm(" int $3");
83}
84#define BREAK_INSTR_SIZE 1
85#define CACHE_FLUSH_IS_SAFE 1
86#define GDB_ADJUSTS_BREAK_OFFSET
87
88extern int kgdb_ll_trap(int cmd, const char *str,
89 struct pt_regs *regs, long err, int trap, int sig);
90
91#endif
92