X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=include%2Flinux%2Fkallsyms.h;h=1cebcbc28b474d9f7af1d4061f0e30ba60347aa8;hb=801c135ce73d5df1caf3eca35b66a10824ae0707;hp=ad71ac053d6ed95be0e6a6b391aadf93903cac31;hpb=b02454f43578b24bc8b8ab54a239156841f56f6d;p=safe%2Fjmp%2Flinux-2.6 diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h index ad71ac0..1cebcbc 100644 --- a/include/linux/kallsyms.h +++ b/include/linux/kallsyms.h @@ -12,6 +12,10 @@ /* Lookup the address for a symbol. Returns 0 if not found. */ unsigned long kallsyms_lookup_name(const char *name); +extern int kallsyms_lookup_size_offset(unsigned long addr, + unsigned long *symbolsize, + unsigned long *offset); + /* Lookup an address. modname is set to NULL if it's in the kernel. */ const char *kallsyms_lookup(unsigned long addr, unsigned long *symbolsize, @@ -28,6 +32,13 @@ static inline unsigned long kallsyms_lookup_name(const char *name) return 0; } +static inline int kallsyms_lookup_size_offset(unsigned long addr, + unsigned long *symbolsize, + unsigned long *offset) +{ + return 0; +} + static inline const char *kallsyms_lookup(unsigned long addr, unsigned long *symbolsize, unsigned long *offset, @@ -64,4 +75,18 @@ static inline void print_symbol(const char *fmt, unsigned long addr) __builtin_extract_return_addr((void *)addr)); } +#ifndef CONFIG_64BIT +#define print_ip_sym(ip) \ +do { \ + printk("[<%08lx>]", ip); \ + print_symbol(" %s\n", ip); \ +} while(0) +#else +#define print_ip_sym(ip) \ +do { \ + printk("[<%016lx>]", ip); \ + print_symbol(" %s\n", ip); \ +} while(0) +#endif + #endif /*_LINUX_KALLSYMS_H*/