]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Shadow SIM's debug_printf function
authorGary Benson <gbenson@redhat.com>
Thu, 28 Aug 2014 10:59:09 +0000 (11:59 +0100)
committerGary Benson <gbenson@redhat.com>
Thu, 28 Aug 2014 10:59:09 +0000 (11:59 +0100)
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.

sim/common/ChangeLog
sim/common/sim-trace.h

index 6879c001bb060d389cc4ea8d934ceb106cc07fb6..64f208146f48d2fdf784e84e381d30686a28b0bc 100644 (file)
@@ -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.
index 5fb58e1a5477445c017f860ecd8394f4a6afcc25..69fffb4eda85db7a8df554244c3b37335edc30a6 100644 (file)
@@ -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)));