qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH -v2 1/2] Log reset events


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH -v2 1/2] Log reset events
Date: Fri, 16 Jan 2009 13:25:54 +0100
User-agent: Thunderbird 2.0.0.17 (X11/20080922)

Laurent Desnogues schrieb:
> On Fri, Jan 16, 2009 at 1:14 PM, Kevin Wolf <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]