2 * Copyright (C) 2015 Yoshinori Sato <ysato@users.sourceforge.jp>
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
9 #ifndef _ASM_H8300_KGDB_H
10 #define _ASM_H8300_KGDB_H
12 #define CACHE_FLUSH_IS_SAFE 1
16 GDB_ER0
, GDB_ER1
, GDB_ER2
, GDB_ER3
,
17 GDB_ER4
, GDB_ER5
, GDB_ER6
, GDB_SP
,
20 #if defined(CONFIG_CPU_H8S)
24 #if defined(CONFIG_CPU_H8S)
27 /* do not change the last entry or anything below! */
28 GDB_NUMREGBYTES
, /* number of registers */
31 #define GDB_SIZEOF_REG sizeof(u32)
32 #if defined(CONFIG_CPU_H8300H)
33 #define DBG_MAX_REG_NUM (13)
34 #elif defined(CONFIG_CPU_H8S)
35 #define DBG_MAX_REG_NUM (14)
37 #define NUMREGBYTES (DBG_MAX_REG_NUM * GDB_SIZEOF_REG)
39 #define BREAK_INSTR_SIZE 2
40 static inline void arch_kgdb_breakpoint(void)
42 __asm__
__volatile__("trapa #2");
45 #endif /* _ASM_H8300_KGDB_H */