mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
qemu_log_lock/unlock now preserves the qemu_logfile handle.
qemu_log_lock() now returns a handle and qemu_log_unlock() receives a handle to unlock. This allows for changing the handle during logging and ensures the lock() and unlock() are for the same file. Also in target/tilegx/translate.c removed the qemu_log_lock()/unlock() calls (and the log("\n")), since the translator can longjmp out of the loop if it attempts to translate an instruction in an inaccessible page. Signed-off-by: Robert Foley <robert.foley@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20191118211528.3221-5-robert.foley@linaro.org>
This commit is contained in:
parent
b8121fe7c0
commit
fc59d2d870
15 changed files with 39 additions and 42 deletions
|
@ -2502,14 +2502,15 @@ static void gen_unknown_opcode(CPUX86State *env, DisasContext *s)
|
|||
gen_illegal_opcode(s);
|
||||
|
||||
if (qemu_loglevel_mask(LOG_UNIMP)) {
|
||||
FILE *logfile = qemu_log_lock();
|
||||
target_ulong pc = s->pc_start, end = s->pc;
|
||||
qemu_log_lock();
|
||||
|
||||
qemu_log("ILLOPC: " TARGET_FMT_lx ":", pc);
|
||||
for (; pc < end; ++pc) {
|
||||
qemu_log(" %02x", cpu_ldub_code(env, pc));
|
||||
}
|
||||
qemu_log("\n");
|
||||
qemu_log_unlock();
|
||||
qemu_log_unlock(logfile);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue