qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 06/10] target-avr: adding helpers for IN, OUT, S


From: Michael Rolnik
Subject: Re: [Qemu-devel] [PATCH 06/10] target-avr: adding helpers for IN, OUT, SLEEP, WBR & unsupported instructions
Date: Sun, 5 Jun 2016 08:10:58 +0300

switched to qemu_log. it will be removed after a while.

On Sun, Jun 5, 2016 at 1:48 AM, Richard Henderson <address@hidden> wrote:

> On 06/02/2016 01:06 PM, Michael Rolnik wrote:
>
>> +void                helper_unsupported(
>> +                                CPUAVRState        *env)
>> +{
>> +    CPUState   *cs = CPU(avr_env_get_cpu(env));
>> +
>> +    cs->exception_index = EXCP_DEBUG;
>> +    cpu_dump_state(cs, stderr, fprintf, 0);
>> +    cpu_loop_exit(cs);
>> +}
>>
> ...
>
>> +void                helper_wdr(
>> +                                CPUAVRState        *env)
>> +{
>> +    CPUState   *cs = CPU(avr_env_get_cpu(env));
>> +
>> +    cs->exception_index = EXCP_DEBUG;
>> +    cpu_loop_exit(cs);
>> +}
>>
>
> Surely EXCP_DEBUG isn't the right thing to be using for these.
>
> +target_ulong        helper_inb(
>> +                                CPUAVRState        *env,
>> +                                uint32_t            port)
>> +{
>> +    printf("in: io[%02x]\n", port);
>>
>
> No printf.
>
> If you like you can use qemu_log, but for something like this, probably
> the most useful is the tracing infrastructure.  See the trace-events file.
>
>
> r~
>



-- 
Best Regards,
Michael Rolnik


reply via email to

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