This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PING PATCH] Rename SIM's debug_printf (Was: [PATCH 4/5 v7] Introduce common-debug.h)
- From: Gary Benson <gbenson at redhat dot com>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: "Frank Ch. Eigler" <fche at redhat dot com>, Steve Ellcey <sellcey at mips dot com>, Doug Evans <dje at google dot com>, gdb-patches <gdb-patches at sourceware dot org>, Pedro Alves <palves at redhat dot com>, Joel Sherrill <joel dot sherrill at oarcorp dot com>
- Date: Wed, 27 Aug 2014 09:53:09 +0100
- Subject: [PING PATCH] Rename SIM's debug_printf (Was: [PATCH 4/5 v7] Introduce common-debug.h)
- Authentication-results: sourceware.org; auth=none
- References: <20140819091220 dot GB6493 at blade dot nx> <20140820215800 dot GA26899 at blade dot nx> <20140820224741 dot GE5363 at redhat dot com> <2362980 dot Wvr8be2HuO at vapier>
Mike Frysinger wrote:
> On Wed 20 Aug 2014 18:47:41 Frank Ch. Eigler wrote:
> > > > (I have no objection to the #define in gdb/*.)
> > >
> > > I take this to mean you do object to a #define in sim/*.
> >
> > No - just that a gdb/* patch the only one I think I saw. Making
> > an analogue for sim/* would be fine, but testing it for wide
> > buildability will be a hassle.
>
> i wouldn't worry too much about that ... i have local builds for
> most every target, and i think some others notice when things break
> too
Frank, are you ok with the patch in sim/* with Mike's assurances?
I inlined the patch under discussion below, for avoidance of doubt.
Thanks,
Gary
--
2014-08-20 Gary Benson <gbenson@redhat.com>
* sim-trace.h (debug_printf): New define.
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)));