| 1 |
#if defined(CONFIG_ARCH_SUPPORTS_UPROBES) && defined(CONFIG_UPROBES) |
| 2 |
#include <linux/wait.h> |
| 3 |
#include <linux/uprobes.h> |
| 4 |
|
| 5 |
// check for linux commit da09a9e0c3eab1 |
| 6 |
int handler(struct uprobe_consumer *self, struct pt_regs *regs, __u64 *data); |
| 7 |
int handler(struct uprobe_consumer *self, struct pt_regs *regs, __u64 *data) { return 0; } |
| 8 |
|
| 9 |
struct uprobe_consumer* foo(void); |
| 10 |
struct uprobe_consumer* foo(void) { |
| 11 |
static struct uprobe_consumer uc; |
| 12 |
uc.handler = handler; |
| 13 |
return &uc; |
| 14 |
} |
| 15 |
|
| 16 |
|
| 17 |
#endif |
| 18 |
|