1 /* $Id: kgdb.h,v 1.2 1998/04/11 17:29:07 geert Exp $
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)
13 /* To initialize the serial, first thing called */
14 extern void zs_kgdb_hook(int tty_num
);
15 /* To init the kgdb engine. (called by serial hook)*/
16 extern void set_debug_traps(void);
18 /* To enter the debugger explicitly. */
19 extern void breakpoint(void);
21 /* For taking exceptions
22 * these are defined in traps.c
24 extern void (*debugger
)(struct pt_regs
*regs
);
25 extern int (*debugger_bpt
)(struct pt_regs
*regs
);
26 extern int (*debugger_sstep
)(struct pt_regs
*regs
);
27 extern int (*debugger_iabr_match
)(struct pt_regs
*regs
);
28 extern int (*debugger_dabr_match
)(struct pt_regs
*regs
);
29 extern void (*debugger_fault_handler
)(struct pt_regs
*regs
);
31 /* What we bring to the party */
32 int kgdb_bpt(struct pt_regs
*regs
);
33 int kgdb_sstep(struct pt_regs
*regs
);
34 void kgdb(struct pt_regs
*regs
);
35 int kgdb_iabr_match(struct pt_regs
*regs
);
36 int kgdb_dabr_match(struct pt_regs
*regs
);
37 static void kgdb_fault_handler(struct pt_regs
*regs
);
38 static void handle_exception (struct pt_regs
*regs
);
41 * external low-level support routines (ie macserial.c)
43 extern void kgdb_interruptible(int); /* control interrupts from serial */
44 extern void putDebugChar(char); /* write a single character */
45 extern char getDebugChar(void); /* read and return a single char */
47 #endif /* !(__ASSEMBLY__) */
48 #endif /* !(_PPC_KGDB_H) */