mirror of
https://github.com/eunomia-bpf/bpf-developer-tutorial.git
synced 2026-04-29 12:59:58 +08:00
Deploying to gh-pages from @ eunomia-bpf/bpf-developer-tutorial@4671af2739 🚀
This commit is contained in:
19
38-btf-uprobe/examples/btf-base-new.c
Normal file
19
38-btf-uprobe/examples/btf-base-new.c
Normal file
@@ -0,0 +1,19 @@
|
||||
#include <stdio.h>
|
||||
|
||||
struct data {
|
||||
int a;
|
||||
int b;
|
||||
int c;
|
||||
int d;
|
||||
};
|
||||
|
||||
int add_test(struct data *d) {
|
||||
return d->a + d->c;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
struct data d = {1, 2, 3, 4};
|
||||
printf("add_test(&d) = %d\n", add_test(&d));
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user