blob: b0f2dbdf1a150dde3ec4d4f2aec8d8c128d79a7c [file] [log] [blame]
Sasha Levin5634bd72013-06-13 18:41:17 -04001#ifndef _LIBLOCKDEP_LINUX_KALLSYMS_H_
2#define _LIBLOCKDEP_LINUX_KALLSYMS_H_
3
4#include <linux/kernel.h>
5#include <stdio.h>
6
7#define KSYM_NAME_LEN 128
8
9struct module;
10
11static inline const char *kallsyms_lookup(unsigned long addr,
12 unsigned long *symbolsize,
13 unsigned long *offset,
14 char **modname, char *namebuf)
15{
16 return NULL;
17}
18
19#include <execinfo.h>
20#include <stdlib.h>
21static inline void print_ip_sym(unsigned long ip)
22{
23 char **name;
24
25 name = backtrace_symbols((void **)&ip, 1);
26
27 printf("%s\n", *name);
28
29 free(name);
30}
31
32#endif