From 667084153bc2a25921add50af95c8339e7ca77b5 Mon Sep 17 00:00:00 2001 From: Christoph Hindermann <10599299+BitMaskMixer@users.noreply.github.com> Date: Wed, 17 Jul 2024 20:56:44 +0200 Subject: [PATCH] use is_log_level_active to check if logging is enabled --- qemu/tcg/tcg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu/tcg/tcg.c b/qemu/tcg/tcg.c index dcacec7c..a91f2de6 100644 --- a/qemu/tcg/tcg.c +++ b/qemu/tcg/tcg.c @@ -3728,7 +3728,7 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb) TCGOp *op; #ifndef NDEBUG - if (getenv("UNICORN_DEBUG")) { + if (is_log_level_active(CPU_LOG_TB_IN_ASM)) { tcg_dump_ops(s, false, "TCG before optimization:"); } #endif @@ -3777,7 +3777,7 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb) #endif #ifndef NDEBUG - if (getenv("UNICORN_DEBUG")) { + if (is_log_level_active(CPU_LOG_TB_IN_ASM)) { tcg_dump_ops(s, false, "TCG before codegen:"); } #endif