summaryrefslogtreecommitdiff
path: root/kernel/debug/kdb/kdb_private.h
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2010-08-17 00:58:29 +0400
committerJason Wessel <jason.wessel@windriver.com>2010-08-17 00:58:29 +0400
commitb590cddfa6f40447158323b43a13cdae01d9a051 (patch)
treec844374c791d69930b57173d34b2cef917281a02 /kernel/debug/kdb/kdb_private.h
parentda5cabf80e2433131bf0ed8993abc0f7ea618c73 (diff)
downloadlinux-b590cddfa6f40447158323b43a13cdae01d9a051.tar.xz
kdb: fix compile error without CONFIG_KALLSYMS
If CONFIG_KGDB_KDB is set and CONFIG_KALLSYMS is not set the kernel will fail to build with the error: kernel/built-in.o: In function `kallsyms_symbol_next': kernel/debug/kdb/kdb_support.c:237: undefined reference to `kdb_walk_kallsyms' kernel/built-in.o: In function `kallsyms_symbol_complete': kernel/debug/kdb/kdb_support.c:193: undefined reference to `kdb_walk_kallsyms' The kdb_walk_kallsyms needs a #ifdef proper header to match the C implementation. This patch also fixes the compiler warnings in kdb_support.c when compiling without CONFIG_KALLSYMS set. The compiler warnings are a result of the kallsyms_lookup() macro not initializing the two of the pass by reference variables. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Reported-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'kernel/debug/kdb/kdb_private.h')
-rw-r--r--kernel/debug/kdb/kdb_private.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/debug/kdb/kdb_private.h b/kernel/debug/kdb/kdb_private.h
index c438f545a321..be775f7e81e0 100644
--- a/kernel/debug/kdb/kdb_private.h
+++ b/kernel/debug/kdb/kdb_private.h
@@ -255,7 +255,14 @@ extern void kdb_ps1(const struct task_struct *p);
extern void kdb_print_nameval(const char *name, unsigned long val);
extern void kdb_send_sig_info(struct task_struct *p, struct siginfo *info);
extern void kdb_meminfo_proc_show(void);
+#ifdef CONFIG_KALLSYMS
extern const char *kdb_walk_kallsyms(loff_t *pos);
+#else /* ! CONFIG_KALLSYMS */
+static inline const char *kdb_walk_kallsyms(loff_t *pos)
+{
+ return NULL;
+}
+#endif /* ! CONFIG_KALLSYMS */
extern char *kdb_getstr(char *, size_t, char *);
/* Defines for kdb_symbol_print */