kgdb.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright (C) 2015 Yoshinori Sato <ysato@users.sourceforge.jp>
  3. *
  4. * This file is subject to the terms and conditions of the GNU General Public
  5. * License. See the file "COPYING" in the main directory of this archive
  6. * for more details.
  7. */
  8. #ifndef _ASM_H8300_KGDB_H
  9. #define _ASM_H8300_KGDB_H
  10. #define CACHE_FLUSH_IS_SAFE 1
  11. #define BUFMAX 2048
  12. enum regnames {
  13. GDB_ER0, GDB_ER1, GDB_ER2, GDB_ER3,
  14. GDB_ER4, GDB_ER5, GDB_ER6, GDB_SP,
  15. GDB_CCR, GDB_PC,
  16. GDB_CYCLLE,
  17. #if defined(CONFIG_CPU_H8S)
  18. GDB_EXR,
  19. #endif
  20. GDB_TICK, GDB_INST,
  21. #if defined(CONFIG_CPU_H8S)
  22. GDB_MACH, GDB_MACL,
  23. #endif
  24. /* do not change the last entry or anything below! */
  25. GDB_NUMREGBYTES, /* number of registers */
  26. };
  27. #define GDB_SIZEOF_REG sizeof(u32)
  28. #if defined(CONFIG_CPU_H8300H)
  29. #define DBG_MAX_REG_NUM (13)
  30. #elif defined(CONFIG_CPU_H8S)
  31. #define DBG_MAX_REG_NUM (14)
  32. #endif
  33. #define NUMREGBYTES (DBG_MAX_REG_NUM * GDB_SIZEOF_REG)
  34. #define BREAK_INSTR_SIZE 2
  35. static inline void arch_kgdb_breakpoint(void)
  36. {
  37. __asm__ __volatile__("trapa #2");
  38. }
  39. #endif /* _ASM_H8300_KGDB_H */