1 #ifndef _LIBLOCKDEP_LINUX_KALLSYMS_H_ 2 #define _LIBLOCKDEP_LINUX_KALLSYMS_H_ 3 4 #include <linux/kernel.h> 5 #include <stdio.h> 6 #include <unistd.h> 7 8 #define KSYM_NAME_LEN 128 9 10 struct module; 11 12 static inline const char *kallsyms_lookup(unsigned long addr, 13 unsigned long *symbolsize, 14 unsigned long *offset, 15 char **modname, char *namebuf) 16 { 17 return NULL; 18 } 19 20 #include <execinfo.h> 21 #include <stdlib.h> 22 static inline void print_ip_sym(unsigned long ip) 23 { 24 char **name; 25 26 name = backtrace_symbols((void **)&ip, 1); 27 28 dprintf(STDOUT_FILENO, "%s\n", *name); 29 30 free(name); 31 } 32 33 #endif 34
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.