aboutsummaryrefslogtreecommitdiff
path: root/sim/bfin
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-06-24 19:37:21 +0545
committerMike Frysinger <vapier@gentoo.org>2015-06-24 10:40:17 -0400
commitfa8f87e53b68881c5e3aab296b517203407c4378 (patch)
tree6eb1f8996ae765cd81589f6c8e8f318ee92a673b /sim/bfin
parentcf304b56ca48631836bdc4035134b5b5ec3b9d49 (diff)
downloadgdb-fa8f87e53b68881c5e3aab296b517203407c4378.zip
gdb-fa8f87e53b68881c5e3aab296b517203407c4378.tar.gz
gdb-fa8f87e53b68881c5e3aab296b517203407c4378.tar.bz2
sim: trace: add a basic cpu register class
The bfin/msp430 ports already had trace logic set up for reading/writing cpu registers, albeit using different unrelated levels (core & vpu). Add a proper register class for these and for other ports.
Diffstat (limited to 'sim/bfin')
-rw-r--r--sim/bfin/ChangeLog5
-rw-r--r--sim/bfin/interp.c16
-rw-r--r--sim/bfin/sim-main.h12
3 files changed, 5 insertions, 28 deletions
diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog
index 300b081..d0e91b3 100644
--- a/sim/bfin/ChangeLog
+++ b/sim/bfin/ChangeLog
@@ -1,3 +1,8 @@
+2015-06-24 Mike Frysinger <vapier@gentoo.org>
+
+ * interp.c (trace_register): Delete.
+ * sim-main.h (trace_register, TRACE_REGISTER, TRACE_REG): Delete.
+
2015-06-23 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
diff --git a/sim/bfin/interp.c b/sim/bfin/interp.c
index 07030da..3013ca0 100644
--- a/sim/bfin/interp.c
+++ b/sim/bfin/interp.c
@@ -606,22 +606,6 @@ bfin_syscall (SIM_CPU *cpu)
TRACE_SYSCALL (cpu, "%s", _tbuf);
}
-void
-trace_register (SIM_DESC sd,
- sim_cpu *cpu,
- const char *fmt,
- ...)
-{
- va_list ap;
- trace_printf (sd, cpu, "%s %s",
- "reg: ",
- TRACE_PREFIX (CPU_TRACE_DATA (cpu)));
- va_start (ap, fmt);
- trace_vprintf (sd, cpu, fmt, ap);
- va_end (ap);
- trace_printf (sd, cpu, "\n");
-}
-
/* Execute a single instruction. */
static sim_cia
diff --git a/sim/bfin/sim-main.h b/sim/bfin/sim-main.h
index c11dcea..806fe15 100644
--- a/sim/bfin/sim-main.h
+++ b/sim/bfin/sim-main.h
@@ -81,18 +81,6 @@ struct sim_state {
bfin_trace_queue (cpu, oldpc, newpc, hwloop); \
} while (0)
-extern void trace_register (SIM_DESC sd,
- sim_cpu *cpu,
- const char *fmt,
- ...)
- __attribute__((format (printf, 3, 4)));
-#define TRACE_REGISTER(cpu, fmt, ...) \
- do { \
- if (TRACE_CORE_P (cpu)) \
- trace_register (CPU_STATE (cpu), cpu, fmt, ## __VA_ARGS__); \
- } while (0)
-#define TRACE_REG(cpu, reg, val) TRACE_REGISTER (cpu, "wrote "#reg" = %#x", val)
-
/* Default memory size. */
#define BFIN_DEFAULT_MEM_SIZE (128 * 1024 * 1024)