mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-23 05:43:47 +07:00
e58e871bec
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>
34 lines
587 B
C
34 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
|