summaryrefslogtreecommitdiffstats
path: root/linux-user
diff options
context:
space:
mode:
authorHelge Deller2022-09-18 21:45:48 +0200
committerLaurent Vivier2022-09-27 09:29:33 +0200
commit12640b4fe96fe23dc344b03378dda1eea5b7a191 (patch)
tree4ab9baae7610e22576f2171b404632861a66166d /linux-user
parentlinux-user: Log failing executable in EXCP_DUMP() (diff)
downloadqemu-12640b4fe96fe23dc344b03378dda1eea5b7a191.tar.gz
qemu-12640b4fe96fe23dc344b03378dda1eea5b7a191.tar.xz
qemu-12640b4fe96fe23dc344b03378dda1eea5b7a191.zip
linux-user/hppa: Use EXCP_DUMP() to show enhanced debug info
Enhance the hppa linux-user cpu_loop() to show more debugging info on hard errors. Signed-off-by: Helge Deller <deller@gmx.de> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20220918194555.83535-6-deller@gmx.de> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/hppa/cpu_loop.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/linux-user/hppa/cpu_loop.c b/linux-user/hppa/cpu_loop.c
index 64263c3dc4..1ef3b46191 100644
--- a/linux-user/hppa/cpu_loop.c
+++ b/linux-user/hppa/cpu_loop.c
@@ -147,12 +147,15 @@ void cpu_loop(CPUHPPAState *env)
force_sig_fault(TARGET_SIGSEGV, TARGET_SEGV_MAPERR, env->iaoq_f);
break;
case EXCP_ILL:
+ EXCP_DUMP(env, "qemu: got CPU exception 0x%x - aborting\n", trapnr);
force_sig_fault(TARGET_SIGILL, TARGET_ILL_ILLOPN, env->iaoq_f);
break;
case EXCP_PRIV_OPR:
+ EXCP_DUMP(env, "qemu: got CPU exception 0x%x - aborting\n", trapnr);
force_sig_fault(TARGET_SIGILL, TARGET_ILL_PRVOPC, env->iaoq_f);
break;
case EXCP_PRIV_REG:
+ EXCP_DUMP(env, "qemu: got CPU exception 0x%x - aborting\n", trapnr);
force_sig_fault(TARGET_SIGILL, TARGET_ILL_PRVREG, env->iaoq_f);
break;
case EXCP_OVERFLOW:
@@ -171,7 +174,8 @@ void cpu_loop(CPUHPPAState *env)
/* just indicate that signals should be handled asap */
break;
default:
- g_assert_not_reached();
+ EXCP_DUMP(env, "qemu: unhandled CPU exception 0x%x - aborting\n", trapnr);
+ abort();
}
process_pending_signals(env);
}