From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LNloq-0002wm-HG for qemu-devel@nongnu.org; Fri, 16 Jan 2009 05:20:52 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LNlop-0002wG-0a for qemu-devel@nongnu.org; Fri, 16 Jan 2009 05:20:52 -0500 Received: from [199.232.76.173] (port=33569 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LNloo-0002wA-Li for qemu-devel@nongnu.org; Fri, 16 Jan 2009 05:20:50 -0500 Received: from fg-out-1718.google.com ([72.14.220.153]:37335) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LNloo-0001bf-C6 for qemu-devel@nongnu.org; Fri, 16 Jan 2009 05:20:50 -0500 Received: by fg-out-1718.google.com with SMTP id 19so767090fgg.8 for ; Fri, 16 Jan 2009 02:20:47 -0800 (PST) Message-ID: <761ea48b0901160220o371db87m94c4ad83a2f65a09@mail.gmail.com> Date: Fri, 16 Jan 2009 11:20:47 +0100 From: "Laurent Desnogues" Subject: Re: [Qemu-devel] [RESEND][PATCH 1/2] Log reset events In-Reply-To: <49705BCF.8020506@siemens.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <49705BCF.8020506@siemens.com> 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 On Fri, Jan 16, 2009 at 11:05 AM, Jan Kiszka wrote: [...] > > This patch introduces a flag to log CPU resets. Useful for tracing > unexpected resets (such as those triggered by x86 triple faults). [...] > diff --git a/target-arm/helper.c b/target-arm/helper.c > index 81663c8..90421bb 100644 > --- a/target-arm/helper.c > +++ b/target-arm/helper.c > @@ -159,6 +159,12 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t id) > void cpu_reset(CPUARMState *env) > { > uint32_t id; > + > + if (loglevel & CPU_LOG_RESET) { > + fprintf(logfile, "CPU Reset (CPU %d)\n", env->cpu_index); > + cpu_dump_state(env, logfile, fprintf, 0); > + } You should use the new log API which has been introduced yesterday (look in qemu-common.h). Laurent