summaryrefslogtreecommitdiffstats
path: root/firmware/debug.c
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2009-07-02 10:24:27 +0000
committerRafaël Carré <rafael.carre@gmail.com>2009-07-02 10:24:27 +0000
commit278f1f69bb132ee4600f7706ff5783a625f9039c (patch)
tree496248c8c94a7fbf1a2ff75feecef61b05549358 /firmware/debug.c
parent017c1a1027627e601cc5c22e43e42e1735835259 (diff)
downloadrockbox-278f1f69bb132ee4600f7706ff5783a625f9039c.tar.gz
rockbox-278f1f69bb132ee4600f7706ff5783a625f9039c.tar.bz2
rockbox-278f1f69bb132ee4600f7706ff5783a625f9039c.zip
Fix DEBUG builds when CONFIG_CPU != SH7034 and HAVE_GDB_API isn't defined
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21613 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/debug.c')
-rw-r--r--firmware/debug.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/firmware/debug.c b/firmware/debug.c
index 1826022c2c..94404586de 100644
--- a/firmware/debug.c
+++ b/firmware/debug.c
@@ -203,9 +203,7 @@ static void debug(const char *msg)
mem2hex(msg, &debugbuf[1], strlen(msg));
putpacket(debugbuf);
}
-#endif /* SH7034 */
-
-#ifdef HAVE_GDB_API
+#elif defined(HAVE_GDB_API)
static void *get_api_function(int n)
{
struct gdb_api *api = (struct gdb_api *)GDB_API_ADDRESS;
@@ -230,8 +228,17 @@ static void debug(char *msg)
void debug_init(void)
{
}
+#else /* !SH7034 && !HAVE_GDB_API */
+void debug_init(void)
+{
+}
+
+static inline void debug(char *msg)
+{
+ (void)msg;
+}
+#endif
-#endif /* HAVE_GDB_API */
#endif /* end of DEBUG section */
#ifdef __GNUC__