From 959fcc3dbc83cda9eb7ee68e02e9df5a27401918 Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Tue, 7 Mar 2017 01:35:46 -0800 Subject: [PATCH] EBREAK should cause SIGTRAP Not quite right as we're not advancing the PC, but it's better than an assertion failure. --- linux-user/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/linux-user/main.c b/linux-user/main.c index af9148c970f..2f17c56cb0a 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -3846,6 +3846,11 @@ void cpu_loop(CPURISCVState *env) signum = TARGET_SIGILL; sigcode = TARGET_ILL_ILLOPC; break; + case RISCV_EXCP_BREAKPOINT: + signum = TARGET_SIGTRAP; + sigcode = TARGET_TRAP_BRKPT; + sigaddr = env->pc; + break; case QEMU_USER_EXCP_FAULT: signum = TARGET_SIGSEGV; sigcode = TARGET_SEGV_MAPERR;