2 * kgdb.h: Defines and declarations for serial line source level
3 * remote debugging of the Linux kernel using gdb.
5 * PPC Mods (C) 1998 Michael Tesch (tesch@cs.wisc.edu)
7 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version
12 * 2 of the License, or (at your option) any later version.
18 /* To initialize the serial, first thing called */
19 extern void zs_kgdb_hook(int tty_num);
20 /* To init the kgdb engine. (called by serial hook)*/
21 extern void set_debug_traps(void);
23 /* To enter the debugger explicitly. */
24 extern void breakpoint(void);
26 /* For taking exceptions
27 * these are defined in traps.c
29 extern void (*debugger)(struct pt_regs *regs);
30 extern int (*debugger_bpt)(struct pt_regs *regs);
31 extern int (*debugger_sstep)(struct pt_regs *regs);
32 extern int (*debugger_iabr_match)(struct pt_regs *regs);
33 extern int (*debugger_dabr_match)(struct pt_regs *regs);
34 extern void (*debugger_fault_handler)(struct pt_regs *regs);
36 /* What we bring to the party */
37 int kgdb_bpt(struct pt_regs *regs);
38 int kgdb_sstep(struct pt_regs *regs);
39 void kgdb(struct pt_regs *regs);
40 int kgdb_iabr_match(struct pt_regs *regs);
41 int kgdb_dabr_match(struct pt_regs *regs);
42 static void kgdb_fault_handler(struct pt_regs *regs);
43 static void handle_exception (struct pt_regs *regs);
46 * external low-level support routines (ie macserial.c)
48 extern void kgdb_interruptible(int); /* control interrupts from serial */
49 extern void putDebugChar(char); /* write a single character */
50 extern char getDebugChar(void); /* read and return a single char */
52 #endif /* !(__ASSEMBLY__) */
53 #endif /* !(_PPC64_KGDB_H) */