mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
![Levin, Alexander (Sasha Levin)](/assets/img/avatar_default.png)
Move to using tools/include/ instead. Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: acme@redhat.com Link: http://lkml.kernel.org/r/20170531003747.10557-2-alexander.levin@verizon.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
33 lines
587 B
C
33 lines
587 B
C
#ifndef _LIBLOCKDEP_LINUX_KALLSYMS_H_
|
|
#define _LIBLOCKDEP_LINUX_KALLSYMS_H_
|
|
|
|
#include <linux/kernel.h>
|
|
#include <stdio.h>
|
|
#include <unistd.h>
|
|
|
|
#define KSYM_NAME_LEN 128
|
|
|
|
struct module;
|
|
|
|
static inline const char *kallsyms_lookup(unsigned long addr,
|
|
unsigned long *symbolsize,
|
|
unsigned long *offset,
|
|
char **modname, char *namebuf)
|
|
{
|
|
return NULL;
|
|
}
|
|
|
|
#include <execinfo.h>
|
|
#include <stdlib.h>
|
|
static inline void print_ip_sym(unsigned long ip)
|
|
{
|
|
char **name;
|
|
|
|
name = backtrace_symbols((void **)&ip, 1);
|
|
|
|
dprintf(STDOUT_FILENO, "%s\n", *name);
|
|
|
|
free(name);
|
|
}
|
|
|
|
#endif
|