2 * May be copied or modified under the terms of the GNU General Public
3 * License. See linux/COPYING for more information.
5 * Based on original code by Glenn Engel, Jim Kingdon,
6 * David Grothe <dave@gcom.com>, Tigran Aivazian, <tigran@sco.com> and
7 * Amit S. Kale <akale@veritas.com>
9 * Super-H port based on sh-stub.c (Ben Lee and Steve Chamberlain) by
10 * Henry Bell <henry.bell@st.com>
12 * Header file for low-level support for remote debug using GDB.
19 #include <asm/ptrace.h>
21 /* Same as pt_regs but has vbr in place of syscall_nr */
23 unsigned long regs[16];
34 extern char kgdb_in_gdb_mode;
35 extern int kgdb_nofault; /* Ignore bus errors (in gdb mem access) */
36 extern char in_nmi; /* Debounce flag to prevent NMI reentry*/
39 extern int kgdb_portnum;
41 extern char kgdb_parity;
42 extern char kgdb_bits;
44 /* Init and interface stuff */
45 extern int kgdb_init(void);
46 extern int (*kgdb_getchar)(void);
47 extern void (*kgdb_putchar)(int);
50 typedef void (kgdb_debug_hook_t)(struct pt_regs *regs);
51 typedef void (kgdb_bus_error_hook_t)(void);
52 extern kgdb_debug_hook_t *kgdb_debug_hook;
53 extern kgdb_bus_error_hook_t *kgdb_bus_err_hook;
57 void kgdb_console_write(struct console *co, const char *s, unsigned count);
58 extern int kgdb_console_setup(struct console *, char *);
60 /* Prototypes for jmp fns */
62 typedef int jmp_buf[_JBLEN];
63 extern void longjmp(jmp_buf __jmpb, int __retval);
64 extern int setjmp(jmp_buf __jmpb);
66 /* Forced breakpoint */
67 #define breakpoint() __asm__ __volatile__("trapa #0x3c")