Skip to content
This repository has been archived by the owner on Apr 13, 2019. It is now read-only.

Commit

Permalink
EBREAK should cause SIGTRAP
Browse files Browse the repository at this point in the history
Not quite right as we're not advancing the PC, but it's better than an
assertion failure.
  • Loading branch information
sorear committed Mar 7, 2017
1 parent bf0311a commit 959fcc3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions linux-user/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 959fcc3

Please sign in to comment.