qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 11/11] linux-user: convert DEBUG_SIGNAL logging


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 11/11] linux-user: convert DEBUG_SIGNAL logging to tracepoints
Date: Tue, 15 Dec 2015 14:19:24 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0


On 15/12/2015 07:59, Thomas Huth wrote:
> On 12/12/15 11:39, Paolo Bonzini wrote:
>> "Unimplemented" messages go to stderr, everything else goes to tracepoints
>>
>> Signed-off-by: Paolo Bonzini <address@hidden>
>> ---
> [...]
>> diff --git a/linux-user/signal.c b/linux-user/signal.c
>> index 9d62e02..919aa83 100644
>> --- a/linux-user/signal.c
>> +++ b/linux-user/signal.c
> [...]
>> @@ -3972,14 +3974,15 @@ give_sigsegv:
>>  
>>  long do_sigreturn(CPUOpenRISCState *env)
>>  {
>> -
>> -    qemu_log("do_sigreturn: not implemented\n");
>> +    trace_user_do_sigreturn(env, 0);
>> +    fprintf(stderr, "do_sigreturn: not implemented\n");
>>      return -TARGET_ENOSYS;
>>  }
>>  
>>  long do_rt_sigreturn(CPUOpenRISCState *env)
>>  {
>> -    qemu_log("do_rt_sigreturn: not implemented\n");
>> +    trace_user_do_rt_sigreturn(env, 0);
>> +    fprintf(stderr, "do_rt_sigreturn: not implemented\n");
>>      return -TARGET_ENOSYS;
>>  }
> 
> Why not simply using qemu_log_mask(LOG_UNIMP, ...) instead? Isn't that
> what the LOG_UNIMP flag is good for?

LOG_UNIMP has to be enabled explicitly, because it is guest-triggerable.
 Here the error is really fatal, so I decided to use fprintf.  In fact,
it would probably be better to abort after printing an error, but I left
the "return" untouched because I didn't want to do too many changes in
the same patch.

Paolo



reply via email to

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