This source file includes following definitions.
- kdb_stub
1
2
3
4
5
6
7
8
9
10
11 #ifndef _DEBUG_CORE_H_
12 #define _DEBUG_CORE_H_
13
14
15
16
17
18
19 struct kgdb_state {
20 int ex_vector;
21 int signo;
22 int err_code;
23 int cpu;
24 int pass_exception;
25 unsigned long thr_query;
26 unsigned long threadid;
27 long kgdb_usethreadid;
28 struct pt_regs *linux_regs;
29 atomic_t *send_ready;
30 };
31
32
33 #define DCPU_WANT_MASTER 0x1
34 #define DCPU_NEXT_MASTER 0x2
35 #define DCPU_IS_SLAVE 0x4
36 #define DCPU_SSTEP 0x8
37
38 struct debuggerinfo_struct {
39 void *debuggerinfo;
40 struct task_struct *task;
41 int exception_state;
42 int ret_state;
43 int irq_depth;
44 int enter_kgdb;
45 bool rounding_up;
46 };
47
48 extern struct debuggerinfo_struct kgdb_info[];
49
50
51 extern int dbg_remove_all_break(void);
52 extern int dbg_set_sw_break(unsigned long addr);
53 extern int dbg_remove_sw_break(unsigned long addr);
54 extern int dbg_activate_sw_breakpoints(void);
55 extern int dbg_deactivate_sw_breakpoints(void);
56
57
58 extern int dbg_io_get_char(void);
59
60
61 #define DBG_PASS_EVENT -12345
62
63 #define DBG_SWITCH_CPU_EVENT -123456
64 extern int dbg_switch_cpu;
65
66
67 extern int gdb_serial_stub(struct kgdb_state *ks);
68 extern void gdbstub_msg_write(const char *s, int len);
69
70
71 extern int gdbstub_state(struct kgdb_state *ks, char *cmd);
72 extern int dbg_kdb_mode;
73
74 #ifdef CONFIG_KGDB_KDB
75 extern int kdb_stub(struct kgdb_state *ks);
76 extern int kdb_parse(const char *cmdstr);
77 extern int kdb_common_init_state(struct kgdb_state *ks);
78 extern int kdb_common_deinit_state(void);
79 #else
80 static inline int kdb_stub(struct kgdb_state *ks)
81 {
82 return DBG_PASS_EVENT;
83 }
84 #endif
85
86 #endif