From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55212) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9KNF-0006TK-4W for qemu-devel@nongnu.org; Sat, 04 Jun 2016 18:48:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b9KNB-00065D-1Z for qemu-devel@nongnu.org; Sat, 04 Jun 2016 18:48:56 -0400 Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]:34291) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9KNA-000659-Qj for qemu-devel@nongnu.org; Sat, 04 Jun 2016 18:48:52 -0400 Received: by mail-pf0-x243.google.com with SMTP id c84so14648876pfc.1 for ; Sat, 04 Jun 2016 15:48:52 -0700 (PDT) Sender: Richard Henderson References: <1464898022-97990-1-git-send-email-rolnik@amazon.com> <1464898022-97990-6-git-send-email-rolnik@amazon.com> From: Richard Henderson Message-ID: Date: Sat, 4 Jun 2016 15:48:50 -0700 MIME-Version: 1.0 In-Reply-To: <1464898022-97990-6-git-send-email-rolnik@amazon.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 06/10] target-avr: adding helpers for IN, OUT, SLEEP, WBR & unsupported instructions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Rolnik , qemu-devel@nongnu.org Cc: Michael Rolnik 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~