[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 45/45] target/hppa: Log cpu state on return-from-interrupt
From: |
Richard Henderson |
Subject: |
[PATCH 45/45] target/hppa: Log cpu state on return-from-interrupt |
Date: |
Wed, 24 Apr 2024 17:00:23 -0700 |
Inverse of the logging on taking an interrupt.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/hppa/sys_helper.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/target/hppa/sys_helper.c b/target/hppa/sys_helper.c
index 22d6c89964..9b43b556fd 100644
--- a/target/hppa/sys_helper.c
+++ b/target/hppa/sys_helper.c
@@ -18,6 +18,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/log.h"
#include "cpu.h"
#include "exec/exec-all.h"
#include "exec/helper-proto.h"
@@ -93,6 +94,17 @@ void HELPER(rfi)(CPUHPPAState *env)
env->iaoq_b = env->cr_back[1];
env->iasq_f = (env->cr[CR_IIASQ] << 32) & ~(env->iaoq_f & mask);
env->iasq_b = (env->cr_back[0] << 32) & ~(env->iaoq_b & mask);
+
+ if (qemu_loglevel_mask(CPU_LOG_INT)) {
+ FILE *logfile = qemu_log_trylock();
+ if (logfile) {
+ CPUState *cs = env_cpu(env);
+
+ fprintf(logfile, "RFI: cpu %d\n", cs->cpu_index);
+ hppa_cpu_dump_state(cs, logfile, 0);
+ qemu_log_unlock(logfile);
+ }
+ }
}
static void getshadowregs(CPUHPPAState *env)
--
2.34.1
- [PATCH 21/45] target/hppa: Use TCG_COND_TST* in do_log_cond, (continued)
- [PATCH 21/45] target/hppa: Use TCG_COND_TST* in do_log_cond, Richard Henderson, 2024/04/24
- [PATCH 33/45] target/hppa: Do not mask in copy_iaoq_entry, Richard Henderson, 2024/04/24
- [PATCH 35/45] target/hppa: Split PSW X and B into their own field, Richard Henderson, 2024/04/24
- [PATCH 37/45] target/hppa: Implement PSW_B, Richard Henderson, 2024/04/24
- [PATCH 38/45] target/hppa: Implement PSW_X, Richard Henderson, 2024/04/24
- [PATCH 39/45] target/hppa: Drop tlb_entry return from hppa_get_physical_address, Richard Henderson, 2024/04/24
- [PATCH 41/45] target/hppa: Implement CF_PCREL, Richard Henderson, 2024/04/24
- [PATCH 44/45] target/hppa: Log cpu state at interrupt, Richard Henderson, 2024/04/24
- [PATCH 43/45] target/hppa: Implement PSW_H, PSW_L, Richard Henderson, 2024/04/24
- [PATCH 42/45] target/hppa: Implement PSW_T, Richard Henderson, 2024/04/24
- [PATCH 45/45] target/hppa: Log cpu state on return-from-interrupt,
Richard Henderson <=
- [PATCH 40/45] target/hppa: Adjust priv for B,GATE at runtime, Richard Henderson, 2024/04/24