h8300: Add KGDB support.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
This commit is contained in:
Yoshinori Sato
2016-01-20 23:27:30 +09:00
parent be13326058
commit 96ff2d7081
5 changed files with 201 additions and 0 deletions

View File

@@ -188,7 +188,11 @@ _interrupt_redirect_table:
jsr @_interrupt_entry /* NMI */
jmp @_system_call /* TRAPA #0 (System call) */
.long 0
#if defined(CONFIG_KGDB)
jmp @_kgdb_trap
#else
.long 0
#endif
jmp @_trace_break /* TRAPA #3 (breakpoint) */
.rept INTERRUPTS-12
jsr @_interrupt_entry
@@ -405,6 +409,20 @@ _nmi:
mov.l @sp+, er0
jmp @_interrupt_entry
#if defined(CONFIG_KGDB)
_kgdb_trap:
subs #4,sp
SAVE_ALL
mov.l sp,er0
add.l #LRET,er0
mov.l er0,@(LSP,sp)
jsr @set_esp0
mov.l sp,er0
subs #4,er0
jsr @h8300_kgdb_trap
jmp @ret_from_exception
#endif
.section .bss
_sw_ksp:
.space 4