kgdb.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef __ASM_KGDB_H_
  2. #define __ASM_KGDB_H_
  3. #ifdef __KERNEL__
  4. #include <asm/sgidefs.h>
  5. #if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2) || \
  6. (_MIPS_ISA == _MIPS_ISA_MIPS32)
  7. #define KGDB_GDB_REG_SIZE 32
  8. #define GDB_SIZEOF_REG sizeof(u32)
  9. #elif (_MIPS_ISA == _MIPS_ISA_MIPS3) || (_MIPS_ISA == _MIPS_ISA_MIPS4) || \
  10. (_MIPS_ISA == _MIPS_ISA_MIPS64)
  11. #ifdef CONFIG_32BIT
  12. #define KGDB_GDB_REG_SIZE 32
  13. #define GDB_SIZEOF_REG sizeof(u32)
  14. #else /* CONFIG_CPU_32BIT */
  15. #define KGDB_GDB_REG_SIZE 64
  16. #define GDB_SIZEOF_REG sizeof(u64)
  17. #endif
  18. #else
  19. #error "Need to set KGDB_GDB_REG_SIZE for MIPS ISA"
  20. #endif /* _MIPS_ISA */
  21. #define BUFMAX 2048
  22. #define DBG_MAX_REG_NUM 72
  23. #define NUMREGBYTES (DBG_MAX_REG_NUM * sizeof(GDB_SIZEOF_REG))
  24. #define NUMCRITREGBYTES (12 * sizeof(GDB_SIZEOF_REG))
  25. #define BREAK_INSTR_SIZE 4
  26. #define CACHE_FLUSH_IS_SAFE 0
  27. extern void arch_kgdb_breakpoint(void);
  28. extern void *saved_vectors[32];
  29. extern void handle_exception(struct pt_regs *regs);
  30. extern void breakinst(void);
  31. extern int kgdb_ll_trap(int cmd, const char *str,
  32. struct pt_regs *regs, long err, int trap, int sig);
  33. #endif /* __KERNEL__ */
  34. #endif /* __ASM_KGDB_H_ */