From: Jason Wessel <jason.wessel@windriver.com>
To: <linux-kernel@vger.kernel.org>
Cc: <mingo@redhat.com>, <masami.hiramatsu.pt@hitachi.com>,
<rusty@rustcorp.com.au>
Subject: [RFC PATCH 8/8] kallsyms,modules: add module_address_line_lookup() to kallsyms_line_loc_lookup()
Date: Fri, 20 Apr 2012 16:29:54 -0500 [thread overview]
Message-ID: <1334957394-12086-9-git-send-email-jason.wessel@windriver.com> (raw)
In-Reply-To: <1334957394-12086-1-git-send-email-jason.wessel@windriver.com>
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@windriver.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
next prev parent reply other threads:[~2012-04-20 21:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-20 21:29 [RFC PATCH 0/8] backtrace/oops with source/line information Jason Wessel
2012-04-20 21:29 ` [RFC PATCH 1/8] readelf: check in a direct copy of readelf.c from binutils 2.14 Jason Wessel
2012-04-20 21:29 ` [RFC PATCH 2/8] readelf: remove code unrelated to .debug_line section processing Jason Wessel
2012-04-20 21:29 ` [RFC PATCH 3/8] readelf: emit simple to parse line .debug_line data Jason Wessel
2012-04-20 21:29 ` [RFC PATCH 4/8] readelf: Fix dumping a 64 bit elf file on a 32 bit host Jason Wessel
2012-04-20 21:29 ` [RFC PATCH 5/8] kallsyms: convert the kallsyms storage to store the type separately Jason Wessel
2012-04-20 21:29 ` [RFC PATCH 6/8] kallsyms: Add kallsyms kallsyms_line_loc_lookup and print function Jason Wessel
2012-04-20 21:29 ` [RFC PATCH 7/8] modules: decode .debug_line sections if provided by insmod Jason Wessel
2012-04-20 21:29 ` Jason Wessel [this message]
2012-04-23 11:44 ` [RFC PATCH 0/8] backtrace/oops with source/line information Masami Hiramatsu
2012-04-23 12:04 ` Jason Wessel
2012-04-27 5:54 ` Masami Hiramatsu
2012-04-27 6:48 ` Cong Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1334957394-12086-9-git-send-email-jason.wessel@windriver.com \
--to=jason.wessel@windriver.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@redhat.com \
--cc=rusty@rustcorp.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®