This commit is contained in:
yunwei37
2024-09-02 06:20:32 +00:00
parent 38e1ba9ee4
commit 1bee8eed67
9 changed files with 101 additions and 214 deletions

View File

@@ -28,8 +28,6 @@
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>
#define GOID_OFFSET 0x98
struct {
@@ -40,7 +38,7 @@ struct {
SEC("uprobe/./go-server-http/main:runtime.casgstatus")
int uprobe_runtime_casgstatus(struct pt_regs *ctx) {
int newval = ctx->cx;
void *gp = ctx->ax;
void *gp = (void*)ctx->ax;
struct goroutine_execute_data *data;
u64 goid;
if (bpf_probe_read_user(&goid, sizeof(goid), gp + GOID_OFFSET) == 0) {