aboutsummaryrefslogtreecommitdiff
path: root/sim/common
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2014-08-28 11:59:09 +0100
committerGary Benson <gbenson@redhat.com>2014-08-28 11:59:09 +0100
commit6aefca7e4978b93f502ff8123a6c3cab6e0171f1 (patch)
tree974cb6e680c992b5378f3d16719a7d104a85ed6e /sim/common
parent6b65d1b6b3bb69051e32537cddf92baa22513cbd (diff)
downloadgdb-6aefca7e4978b93f502ff8123a6c3cab6e0171f1.zip
gdb-6aefca7e4978b93f502ff8123a6c3cab6e0171f1.tar.gz
gdb-6aefca7e4978b93f502ff8123a6c3cab6e0171f1.tar.bz2
Shadow SIM's debug_printf function
GDB and SIM both have functions called "debug_printf", which conflicts at link time. This commit shadows SIM's debug_printf with a macro so that SIM's symbol ends up being called "sim_debug_printf". sim/common/ChangeLog: * sim-trace.h (debug_printf): New define.
Diffstat (limited to 'sim/common')
-rw-r--r--sim/common/ChangeLog4
-rw-r--r--sim/common/sim-trace.h3
2 files changed, 7 insertions, 0 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 6879c00..64f2081 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,7 @@
+2014-08-28 Gary Benson <gbenson@redhat.com>
+
+ * sim-trace.h (debug_printf): New define.
+
2014-08-19 Alan Modra <amodra@gmail.com>
* configure: Regenerate.
diff --git a/sim/common/sim-trace.h b/sim/common/sim-trace.h
index 5fb58e1..69fffb4 100644
--- a/sim/common/sim-trace.h
+++ b/sim/common/sim-trace.h
@@ -583,6 +583,9 @@ extern void trace_vprintf (SIM_DESC, sim_cpu *, const char *, va_list);
/* Non-zero if "--debug-insn" specified. */
#define DEBUG_INSN_P(cpu) DEBUG_P (cpu, DEBUG_INSN_IDX)
+/* GDB also has a debug_printf, so we shadow ours. */
+#define debug_printf sim_debug_printf
+
extern void debug_printf (sim_cpu *, const char *, ...)
__attribute__((format (printf, 2, 3)));