1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright (C) 2015 Altera Corporation
4 * Copyright (C) 2011 Tobias Klauser <tklauser@distanz.ch>
6 * Based on the code posted by Kazuyasu on the Altera Forum at:
7 * http://www.alteraforum.com/forum/showpost.php?p=77003&postcount=20
10 #ifndef _ASM_NIOS2_KGDB_H
11 #define _ASM_NIOS2_KGDB_H
13 #define CACHE_FLUSH_IS_SAFE 1
66 /* do not change the last entry or anything below! */
67 GDB_NUMREGBYTES
/* number of registers */
70 #define GDB_SIZEOF_REG sizeof(u32)
71 #define DBG_MAX_REG_NUM (49)
72 #define NUMREGBYTES (DBG_MAX_REG_NUM * sizeof(GDB_SIZEOF_REG))
74 #define BREAK_INSTR_SIZE 4
75 static inline void arch_kgdb_breakpoint(void)
77 __asm__
__volatile__("trap 30\n");
80 #endif /* _ASM_NIOS2_KGDB_H */