From patchwork Fri Jun 12 10:58:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 7140 Received: (qmail 9768 invoked by alias); 12 Jun 2015 10:58:10 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 9756 invoked by uid 89); 12 Jun 2015 10:58:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: smtp.gentoo.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 12 Jun 2015 10:58:08 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 729BA340945 for ; Fri, 12 Jun 2015 10:58:06 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH] sim: moxie: use new common trace defines Date: Fri, 12 Jun 2015 06:58:04 -0400 Message-Id: <1434106684-16255-1-git-send-email-vapier@gentoo.org> X-IsSubscribed: yes Now that there's common helpers for printing trace data, switch to that to restore the insn tracing support for this target. Committed. --- sim/moxie/ChangeLog | 5 +++++ sim/moxie/interp.c | 13 +++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/sim/moxie/ChangeLog b/sim/moxie/ChangeLog index f27863b..b33ac06 100644 --- a/sim/moxie/ChangeLog +++ b/sim/moxie/ChangeLog @@ -1,5 +1,10 @@ 2015-06-12 Mike Frysinger + * interp.c (tracefile, tracing): Delete. + (MOXIE_TRACE_INSN): Call TRACE_INSN directly. + +2015-06-12 Mike Frysinger + * interp.c (TRACE): Rename to ... (MOXIE_TRACE_INSN): ... this. (sim_engine_run): Change TRACE to MOXIE_TRACE_INSN. diff --git a/sim/moxie/interp.c b/sim/moxie/interp.c index 0d068fe..35ee2a7 100644 --- a/sim/moxie/interp.c +++ b/sim/moxie/interp.c @@ -229,10 +229,15 @@ convert_target_flags (unsigned int tflags) return hflags; } -/* TODO: Move to sim-trace.h. */ -static FILE *tracefile; -static const int tracing = 0; -#define MOXIE_TRACE_INSN(str) if (tracing) fprintf(tracefile,"0x%08x, %s, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x\n", opc, str, cpu.asregs.regs[0], cpu.asregs.regs[1], cpu.asregs.regs[2], cpu.asregs.regs[3], cpu.asregs.regs[4], cpu.asregs.regs[5], cpu.asregs.regs[6], cpu.asregs.regs[7], cpu.asregs.regs[8], cpu.asregs.regs[9], cpu.asregs.regs[10], cpu.asregs.regs[11], cpu.asregs.regs[12], cpu.asregs.regs[13], cpu.asregs.regs[14], cpu.asregs.regs[15]); +/* TODO: Split this up into finger trace levels than just insn. */ +#define MOXIE_TRACE_INSN(str) \ + TRACE_INSN (scpu, "0x%08x, %s, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x", \ + opc, str, cpu.asregs.regs[0], cpu.asregs.regs[1], \ + cpu.asregs.regs[2], cpu.asregs.regs[3], cpu.asregs.regs[4], \ + cpu.asregs.regs[5], cpu.asregs.regs[6], cpu.asregs.regs[7], \ + cpu.asregs.regs[8], cpu.asregs.regs[9], cpu.asregs.regs[10], \ + cpu.asregs.regs[11], cpu.asregs.regs[12], cpu.asregs.regs[13], \ + cpu.asregs.regs[14], cpu.asregs.regs[15]) void sim_engine_run (SIM_DESC sd,