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: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 06/10] target-avr: adding helpers for IN, OUT, SLEEP, WBR & unsupported instructions
Date: Sat, 4 Jun 2016 15:48:50 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0

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~



reply via email to

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