mirror of
https://github.com/qemu/qemu.git
synced 2024-11-30 23:33:51 +08:00
target/hppa: Log cpu state at interrupt
This contains all of the information logged before, plus more. Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
6dd9b145f6
commit
12959fcdcf
@ -241,21 +241,22 @@ void hppa_cpu_do_interrupt(CPUState *cs)
|
||||
[EXCP_SYSCALL_LWS] = "syscall-lws",
|
||||
[EXCP_TOC] = "TOC (transfer of control)",
|
||||
};
|
||||
static int count;
|
||||
const char *name = NULL;
|
||||
char unknown[16];
|
||||
|
||||
if (i >= 0 && i < ARRAY_SIZE(names)) {
|
||||
name = names[i];
|
||||
FILE *logfile = qemu_log_trylock();
|
||||
if (logfile) {
|
||||
const char *name = NULL;
|
||||
|
||||
if (i >= 0 && i < ARRAY_SIZE(names)) {
|
||||
name = names[i];
|
||||
}
|
||||
if (name) {
|
||||
fprintf(logfile, "INT: cpu %d %s\n", cs->cpu_index, name);
|
||||
} else {
|
||||
fprintf(logfile, "INT: cpu %d unknown %d\n", cs->cpu_index, i);
|
||||
}
|
||||
hppa_cpu_dump_state(cs, logfile, 0);
|
||||
qemu_log_unlock(logfile);
|
||||
}
|
||||
if (!name) {
|
||||
snprintf(unknown, sizeof(unknown), "unknown %d", i);
|
||||
name = unknown;
|
||||
}
|
||||
qemu_log("INT %6d: %s @ " TARGET_FMT_lx ":" TARGET_FMT_lx
|
||||
" for " TARGET_FMT_lx ":" TARGET_FMT_lx "\n",
|
||||
++count, name, env->cr[CR_IIASQ], env->cr[CR_IIAOQ],
|
||||
env->cr[CR_ISR], env->cr[CR_IOR]);
|
||||
}
|
||||
cs->exception_index = -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user