iovisor / bcc

BCC - Tools for BPF-based Linux IO analysis, networking, monitoring, and more
Apache License 2.0
20.36k stars 3.86k forks source link

attach to specific address of user space spplication in c #5016

Open Akbasniwal opened 4 months ago

Akbasniwal commented 4 months ago

Since we can attach ebpf program to any specific address in python using uprobe using the following function b.attach_uprobe(name="/usr/bin/bash", addr=event_addr , fn_name="func_name")

But in c apart from specifying the address in .c file using libbpf-tools we also have to specify symbol in section inside .bpf.c file for uprobe function.So how can we achieve similar functionality in pure c code as well?