| 1 |
#include <linux/sched.h> |
| 2 |
#include <asm/stacktrace.h> |
| 3 |
|
| 4 |
// check for 4.6 patch which changed the function signature of |
| 5 |
// stacktrace_ops 'address' member. |
| 6 |
|
| 7 |
int print_stack_address(void *data __attribute__ ((unused)), |
| 8 |
unsigned long addr __attribute__ ((unused)), |
| 9 |
int reliable __attribute__ ((unused))); |
| 10 |
|
| 11 |
int print_stack_address(void *data __attribute__ ((unused)), |
| 12 |
unsigned long addr __attribute__ ((unused)), |
| 13 |
int reliable __attribute__ ((unused))) |
| 14 |
{ |
| 15 |
return 0; |
| 16 |
} |
| 17 |
|
| 18 |
struct stacktrace_ops ops __attribute__ ((unused)) = {.address=print_stack_address}; |