kgdb.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * kgdb.h: Defines and declarations for serial line source level
  3. * remote debugging of the Linux kernel using gdb.
  4. *
  5. * PPC Mods (C) 1998 Michael Tesch (tesch@cs.wisc.edu)
  6. *
  7. * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
  8. */
  9. #ifdef __KERNEL__
  10. #ifndef _PPC_KGDB_H
  11. #define _PPC_KGDB_H
  12. #ifndef __ASSEMBLY__
  13. /* Things specific to the gen550 backend. */
  14. struct uart_port;
  15. extern void gen550_progress(char *, unsigned short);
  16. extern void gen550_kgdb_map_scc(void);
  17. extern void gen550_init(int, struct uart_port *);
  18. /* Things specific to the pmac backend. */
  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);
  22. /* To enter the debugger explicitly. */
  23. extern void breakpoint(void);
  24. /* For taking exceptions
  25. * these are defined in traps.c
  26. */
  27. extern int (*debugger)(struct pt_regs *regs);
  28. extern int (*debugger_bpt)(struct pt_regs *regs);
  29. extern int (*debugger_sstep)(struct pt_regs *regs);
  30. extern int (*debugger_iabr_match)(struct pt_regs *regs);
  31. extern int (*debugger_dabr_match)(struct pt_regs *regs);
  32. extern void (*debugger_fault_handler)(struct pt_regs *regs);
  33. /* What we bring to the party */
  34. int kgdb_bpt(struct pt_regs *regs);
  35. int kgdb_sstep(struct pt_regs *regs);
  36. void kgdb(struct pt_regs *regs);
  37. int kgdb_iabr_match(struct pt_regs *regs);
  38. int kgdb_dabr_match(struct pt_regs *regs);
  39. /*
  40. * external low-level support routines (ie macserial.c)
  41. */
  42. extern void kgdb_interruptible(int); /* control interrupts from serial */
  43. extern void putDebugChar(char); /* write a single character */
  44. extern char getDebugChar(void); /* read and return a single char */
  45. #endif /* !(__ASSEMBLY__) */
  46. #endif /* !(_PPC_KGDB_H) */
  47. #endif /* __KERNEL__ */