aboutsummaryrefslogtreecommitdiff
path: root/target/unicore32
diff options
context:
space:
mode:
authorRobert Foley <robert.foley@linaro.org>2019-11-18 16:15:26 -0500
committerAlex Bennée <alex.bennee@linaro.org>2019-12-18 20:18:02 +0000
commitfc59d2d870caddf5cd9c85836ee4a8c59ffe7617 (patch)
treebb6cf999b19d14bac59b5d789e7e0969c4dea091 /target/unicore32
parentb8121fe7c005dc3d56e82a0a5ce00563a5fd49d0 (diff)
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>
Diffstat (limited to 'target/unicore32')
-rw-r--r--target/unicore32/translate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/unicore32/translate.c b/target/unicore32/translate.c
index 0e01f35856..0f6891b8aa 100644
--- a/target/unicore32/translate.c
+++ b/target/unicore32/translate.c
@@ -1994,12 +1994,12 @@ done_generating:
#ifdef DEBUG_DISAS
if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)
&& qemu_log_in_addr_range(pc_start)) {
- qemu_log_lock();
+ FILE *logfile = qemu_log_lock();
qemu_log("----------------\n");
qemu_log("IN: %s\n", lookup_symbol(pc_start));
log_target_disas(cs, pc_start, dc->pc - pc_start);
qemu_log("\n");
- qemu_log_unlock();
+ qemu_log_unlock(logfile);
}
#endif
tb->size = dc->pc - pc_start;