From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LNngK-0005Bo-03 for qemu-devel@nongnu.org; Fri, 16 Jan 2009 07:20:12 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LNngI-0005Af-EG for qemu-devel@nongnu.org; Fri, 16 Jan 2009 07:20:11 -0500 Received: from [199.232.76.173] (port=41038 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LNngH-0005AU-By for qemu-devel@nongnu.org; Fri, 16 Jan 2009 07:20:09 -0500 Received: from cantor2.suse.de ([195.135.220.15]:49898 helo=mx2.suse.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LNngH-00089u-3a for qemu-devel@nongnu.org; Fri, 16 Jan 2009 07:20:09 -0500 Received: from Relay2.suse.de (relay-ext.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 753B8484AB for ; Fri, 16 Jan 2009 13:20:07 +0100 (CET) Message-ID: <49707CD2.8090003@suse.de> Date: Fri, 16 Jan 2009 13:25:54 +0100 From: Kevin Wolf MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH -v2 1/2] Log reset events References: <49705BCF.8020506@siemens.com> <761ea48b0901160220o371db87m94c4ad83a2f65a09@mail.gmail.com> <49707035.2000606@siemens.com> <49707600.3070509@siemens.com> <49707A15.5030803@suse.de> <761ea48b0901160412i67bb876flcb0070ccdf4ac120@mail.gmail.com> In-Reply-To: <761ea48b0901160412i67bb876flcb0070ccdf4ac120@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Laurent Desnogues schrieb: > On Fri, Jan 16, 2009 at 1:14 PM, Kevin Wolf wrote: > [..] >>> @@ -159,6 +159,12 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t id) >>> void cpu_reset(CPUARMState *env) >>> { >>> uint32_t id; >>> + >>> + if (qemu_loglevel_mask(CPU_LOG_RESET)) { >>> + fprintf(logfile, "CPU Reset (CPU %d)\n", env->cpu_index); >>> + cpu_dump_state(env, logfile, fprintf, 0); >> Shouldn't that be qemu_log() and log_cpu_state() now? > > Yes. Sorry Jan :) > > A trick to check things are done properly is to make sure you > don't ever use logfile or loglevel variables. Maybe qemu_log() should be a function rather than a macro? Then loglevel and logfile could be static and the build would break if you try to use them outside the logging code. Kevin