[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1334957394-12086-9-git-send-email-jason.wessel@windriver.com>
Date: Fri, 20 Apr 2012 16:29:54 -0500
From: Jason Wessel <jason.wessel@...driver.com>
To: <linux-kernel@...r.kernel.org>
CC: <mingo@...hat.com>, <masami.hiramatsu.pt@...achi.com>,
<rusty@...tcorp.com.au>
Subject: [RFC PATCH 8/8] kallsyms,modules: add module_address_line_lookup() to kallsyms_line_loc_lookup()
This patch connects the kallsyms line location lookups into also
asking for lines for locations information from kernel modules.
The kernel module subsystem can provide line location information
independently of the core kernel and is in no way dependent on the
core kernel being able to lookup line information when
CONFIG_KALLSYMS_LINE_LOCATIONS=y.
Signed-off-by: Jason Wessel <jason.wessel@...driver.com>
---
kernel/kallsyms.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
index 921f2b3..6300c70 100644
--- a/kernel/kallsyms.c
+++ b/kernel/kallsyms.c
@@ -295,7 +295,7 @@ int kallsyms_lookup_size_offset(unsigned long addr, unsigned long *symbolsize,
#ifdef CONFIG_KALLSYMS_LINE_LOCATIONS
/*
- * Lookup an address
+ * Lookup a line location address in the kernel or or a kernel module
* - modname is set to NULL if it's in the kernel.
* - We guarantee that the returned name is valid until we reschedule even if.
* It resides in a module.
@@ -322,7 +322,8 @@ const char *kallsyms_line_loc_lookup(unsigned long addr,
return namebuf;
}
- return NULL;
+ return module_address_line_lookup(addr, symbolsize, offset, modname,
+ namebuf);
}
#else /* !CONFIG_KALLSYMS_LINE_LOCATIONS */
const char *kallsyms_line_loc_lookup(unsigned long addr,
@@ -330,7 +331,8 @@ const char *kallsyms_line_loc_lookup(unsigned long addr,
unsigned long *offset,
char **modname, char *namebuf)
{
- return NULL;
+ return module_address_line_lookup(addr, symbolsize, offset, modname,
+ namebuf);
}
#endif /* CONFIG_KALLSYMS_LINE_LOCATIONS */
--
1.7.10
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists