summaryrefslogtreecommitdiffstats
path: root/include/kallsyms.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-03-08 12:00:10 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2011-03-10 14:50:16 +0100
commitf4491d7b0404191a143aae3ee93fe04d396b3dea (patch)
treea175755560e318ef0b9d9649643cd66fd121c685 /include/kallsyms.h
parent084df155d3f5e4991f675a3e7a707e4eafbd1cd8 (diff)
downloadbarebox-f4491d7b0404191a143aae3ee93fe04d396b3dea.tar.gz
barebox-f4491d7b0404191a143aae3ee93fe04d396b3dea.tar.xz
kallsyms/printk: enable symbol printing support (%pS)
With this kallsyms finally start working at least on ARM. This enables us resolving addresses into symbols which is particularly useful in combination with stack unwinding support. As kallsyms now compile and work we can remove the depends on BROKEN. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/kallsyms.h')
-rw-r--r--include/kallsyms.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/kallsyms.h b/include/kallsyms.h
index 5117be2272..69b84d2c6c 100644
--- a/include/kallsyms.h
+++ b/include/kallsyms.h
@@ -2,6 +2,11 @@
#define __KALLSYMS_H
#define KSYM_NAME_LEN 128
+#define KSYM_SYMBOL_LEN (sizeof("%s+%#lx/%#lx [%s]") + (KSYM_NAME_LEN - 1) + \
+ 2*(BITS_PER_LONG*3/10) + (MODULE_NAME_LEN - 1) + 1)
unsigned long kallsyms_lookup_name(const char *name);
+/* Look up a kernel symbol and return it in a text buffer. */
+int sprint_symbol(char *buffer, unsigned long address);
+
#endif /* __KALLSYMS_H */