summaryrefslogtreecommitdiffstats
path: root/linux-user
diff options
context:
space:
mode:
authorPetar Jovanovic2014-02-28 15:25:32 +0100
committerRiku Voipio2014-03-03 22:09:04 +0100
commitb51910baf227f0fd64abfa7ad6d8e00150a18194 (patch)
tree2d088cd709c7d1bffe09df291857fb8f5dd10346 /linux-user
parentlinux-user: translate signal number on return from sigtimedwait (diff)
downloadqemu-b51910baf227f0fd64abfa7ad6d8e00150a18194.tar.gz
qemu-b51910baf227f0fd64abfa7ad6d8e00150a18194.tar.xz
qemu-b51910baf227f0fd64abfa7ad6d8e00150a18194.zip
linux-user: correct handling of break exception for MIPS
Exception with break instruction has not been correctly propagated as SIGTRAP. This resolves crash issues with examples that use break instruction on MIPS. Signed-off-by: Petar Jovanovic <petar.jovanovic@imgtec.com> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index 919297736c..c19e7fb704 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -2384,6 +2384,10 @@ static int do_break(CPUMIPSState *env, target_siginfo_t *info,
ret = 0;
break;
default:
+ info->si_signo = TARGET_SIGTRAP;
+ info->si_errno = 0;
+ queue_signal(env, info->si_signo, &*info);
+ ret = 0;
break;
}