Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
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
10struct module;
11
12static 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>
22static 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