2 * Copyright (C) 2015 Altera Corporation
3 * Copyright (C) 2011 Tobias Klauser <tklauser@distanz.ch>
5 * Based on the code posted by Kazuyasu on the Altera Forum at:
6 * http://www.alteraforum.com/forum/showpost.php?p=77003&postcount=20
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
23 #ifndef _ASM_NIOS2_KGDB_H
24 #define _ASM_NIOS2_KGDB_H
26 #define CACHE_FLUSH_IS_SAFE 1
79 /* do not change the last entry or anything below! */
80 GDB_NUMREGBYTES
/* number of registers */
83 #define GDB_SIZEOF_REG sizeof(u32)
84 #define DBG_MAX_REG_NUM (49)
85 #define NUMREGBYTES (DBG_MAX_REG_NUM * sizeof(GDB_SIZEOF_REG))
87 #define BREAK_INSTR_SIZE 4
88 static inline void arch_kgdb_breakpoint(void)
90 __asm__
__volatile__("trap 30\n");
93 #endif /* _ASM_NIOS2_KGDB_H */