aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/debug/kdb/kdb_support.c
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2010-08-16 15:58:29 -0500
committerJason Wessel <jason.wessel@windriver.com>2010-08-16 15:58:29 -0500
commitb590cddfa6f40447158323b43a13cdae01d9a051 (patch)
treec844374c791d69930b57173d34b2cef917281a02 /kernel/debug/kdb/kdb_support.c
parentLinux 2.6.36-rc1 (diff)
downloadlinux-dev-b590cddfa6f40447158323b43a13cdae01d9a051.tar.xz
linux-dev-b590cddfa6f40447158323b43a13cdae01d9a051.zip
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_support.c')
-rw-r--r--kernel/debug/kdb/kdb_support.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/debug/kdb/kdb_support.c b/kernel/debug/kdb/kdb_support.c
index 45344d5c53dd..6b2485dcb050 100644
--- a/kernel/debug/kdb/kdb_support.c
+++ b/kernel/debug/kdb/kdb_support.c
@@ -82,8 +82,8 @@ static char *kdb_name_table[100]; /* arbitrary size */
int kdbnearsym(unsigned long addr, kdb_symtab_t *symtab)
{
int ret = 0;
- unsigned long symbolsize;
- unsigned long offset;
+ unsigned long symbolsize = 0;
+ unsigned long offset = 0;
#define knt1_size 128 /* must be >= kallsyms table size */
char *knt1 = NULL;