From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4D7E9C00144 for ; Wed, 27 Jul 2022 02:10:41 +0000 (UTC) Received: from localhost ([::1]:41840 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGWVU-0007T1-2u for qemu-devel@archiver.kernel.org; Tue, 26 Jul 2022 22:10:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53270) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGWUa-0006nE-G5 for qemu-devel@nongnu.org; Tue, 26 Jul 2022 22:09:44 -0400 Received: from mail01.asahi-net.or.jp ([202.224.55.13]:45869) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGWUY-0006pk-E4 for qemu-devel@nongnu.org; Tue, 26 Jul 2022 22:09:44 -0400 Received: from sakura.ysato.name (ik1-413-38519.vs.sakura.ne.jp [153.127.30.23]) (Authenticated sender: PQ4Y-STU) by mail01.asahi-net.or.jp (Postfix) with ESMTPA id 6205410A952; Wed, 27 Jul 2022 11:09:36 +0900 (JST) Received: from SIOS1075.ysato.ml (ZM005235.ppp.dion.ne.jp [222.8.5.235]) by sakura.ysato.name (Postfix) with ESMTPSA id D657F1C021C; Wed, 27 Jul 2022 11:09:35 +0900 (JST) Date: Wed, 27 Jul 2022 11:09:35 +0900 Message-ID: <87wnbzqpb4.wl-ysato@users.sourceforge.jp> From: Yoshinori Sato To: Ilya Leoshkevich Cc: qemu-devel@nongnu.org, Markus Armbruster , Christian Borntraeger Subject: Re: [PATCH] target/sh4: Honor QEMU_LOG_FILENAME with QEMU_LOG=cpu In-Reply-To: <20220725142854.177451-1-iii@linux.ibm.com> References: <20220725142854.177451-1-iii@linux.ibm.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Received-SPF: softfail client-ip=202.224.55.13; envelope-from=ysato@users.sourceforge.jp; helo=mail01.asahi-net.or.jp X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Mon, 25 Jul 2022 23:28:54 +0900, Ilya Leoshkevich wrote: > > When using QEMU_LOG=cpu on sh4, QEMU_LOG_FILENAME is partially ignored. > Fix by using qemu_fprintf() instead of qemu_printf() in the respective > places. > > Fixes: 90c84c560067 ("qom/cpu: Simplify how CPUClass:cpu_dump_state() prints") > Signed-off-by: Ilya Leoshkevich > --- > target/sh4/translate.c | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/target/sh4/translate.c b/target/sh4/translate.c > index f1b190e7cf..9aadaf52cd 100644 > --- a/target/sh4/translate.c > +++ b/target/sh4/translate.c > @@ -171,16 +171,16 @@ void superh_cpu_dump_state(CPUState *cs, FILE *f, int flags) > qemu_fprintf(f, "sgr=0x%08x dbr=0x%08x delayed_pc=0x%08x fpul=0x%08x\n", > env->sgr, env->dbr, env->delayed_pc, env->fpul); > for (i = 0; i < 24; i += 4) { > - qemu_printf("r%d=0x%08x r%d=0x%08x r%d=0x%08x r%d=0x%08x\n", > - i, env->gregs[i], i + 1, env->gregs[i + 1], > - i + 2, env->gregs[i + 2], i + 3, env->gregs[i + 3]); > + qemu_fprintf(f, "r%d=0x%08x r%d=0x%08x r%d=0x%08x r%d=0x%08x\n", > + i, env->gregs[i], i + 1, env->gregs[i + 1], > + i + 2, env->gregs[i + 2], i + 3, env->gregs[i + 3]); > } > if (env->flags & DELAY_SLOT) { > - qemu_printf("in delay slot (delayed_pc=0x%08x)\n", > - env->delayed_pc); > + qemu_fprintf(f, "in delay slot (delayed_pc=0x%08x)\n", > + env->delayed_pc); > } else if (env->flags & DELAY_SLOT_CONDITIONAL) { > - qemu_printf("in conditional delay slot (delayed_pc=0x%08x)\n", > - env->delayed_pc); > + qemu_fprintf(f, "in conditional delay slot (delayed_pc=0x%08x)\n", > + env->delayed_pc); > } else if (env->flags & DELAY_SLOT_RTE) { > qemu_fprintf(f, "in rte delay slot (delayed_pc=0x%08x)\n", > env->delayed_pc); > -- > 2.35.3 > Reviewd-by: Yoshinori Sato -- Yosinori Sato