From 8f4fb411b016846a539a1ff1cd645a555e3737be Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Mon, 27 Mar 2017 21:21:57 -0700 Subject: [PATCH] On EBREAK, set badaddr to pc --- riscv/insns/c_ebreak.h | 2 +- riscv/insns/ebreak.h | 2 +- riscv/trap.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/riscv/insns/c_ebreak.h b/riscv/insns/c_ebreak.h index a17200f..128b86b 100644 --- a/riscv/insns/c_ebreak.h +++ b/riscv/insns/c_ebreak.h @@ -1,2 +1,2 @@ require_extension('C'); -throw trap_breakpoint(); +throw trap_breakpoint(pc); diff --git a/riscv/insns/ebreak.h b/riscv/insns/ebreak.h index c22776c..736cebe 100644 --- a/riscv/insns/ebreak.h +++ b/riscv/insns/ebreak.h @@ -1 +1 @@ -throw trap_breakpoint(); +throw trap_breakpoint(pc); diff --git a/riscv/trap.h b/riscv/trap.h index a289a68..20313e9 100644 --- a/riscv/trap.h +++ b/riscv/trap.h @@ -47,7 +47,7 @@ class mem_trap_t : public trap_t DECLARE_MEM_TRAP(CAUSE_MISALIGNED_FETCH, instruction_address_misaligned) DECLARE_MEM_TRAP(CAUSE_FETCH_ACCESS, instruction_access_fault) DECLARE_TRAP(CAUSE_ILLEGAL_INSTRUCTION, illegal_instruction) -DECLARE_TRAP(CAUSE_BREAKPOINT, breakpoint) +DECLARE_MEM_TRAP(CAUSE_BREAKPOINT, breakpoint) DECLARE_MEM_TRAP(CAUSE_MISALIGNED_LOAD, load_address_misaligned) DECLARE_MEM_TRAP(CAUSE_MISALIGNED_STORE, store_address_misaligned) DECLARE_MEM_TRAP(CAUSE_LOAD_ACCESS, load_access_fault) -- 2.30.2