Skip to content

Commit

Permalink
WIP: debug
Browse files Browse the repository at this point in the history
  • Loading branch information
afek854 committed Oct 30, 2024
1 parent d16532e commit 26e8d74
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions support/ebpf/tracemgmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,10 @@ void send_trace(void *ctx, Trace *trace) {

if (send_size > sizeof(Trace)) {
return; // unreachable
}
}

bpf_perf_event_output(ctx, &trace_events, BPF_F_CURRENT_CPU, trace, send_size);
DEBUG_PRINT("OTEL4 registers ctx: sp %lx", trace->registers.sp);
bpf_perf_event_output(ctx, &trace_events, BPF_F_CURRENT_CPU, trace, send_size+sizeof(struct pt_regs));
}

// is_kernel_address checks if the given address looks like virtual address to kernel memory.
Expand Down
Binary file modified support/ebpf/tracer.ebpf.release.amd64
Binary file not shown.
2 changes: 1 addition & 1 deletion tracer/tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ func (t *Tracer) loadBpfTrace(raw []byte) *host.Trace {

fmt.Println("buchi")

fmt.Println("registers sp", uint64(ptr.registers.sp))
fmt.Println("registers sp ", uint64(ptr.registers.sp), "pid ", ptr.pid)

regs := host.Regs{
R15: uint64(ptr.registers.r15),
Expand Down

0 comments on commit 26e8d74

Please sign in to comment.