From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH] sim: moxie: use new common trace defines
Date: Fri, 12 Jun 2015 10:58:00 -0000 [thread overview]
Message-ID: <1434106684-16255-1-git-send-email-vapier@gentoo.org> (raw)
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 <vapier@gentoo.org>
+ * interp.c (tracefile, tracing): Delete.
+ (MOXIE_TRACE_INSN): Call TRACE_INSN directly.
+
+2015-06-12 Mike Frysinger <vapier@gentoo.org>
+
* 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,
--
2.4.1
reply other threads:[~2015-06-12 10:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1434106684-16255-1-git-send-email-vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).