iovisor / bcc

BCC - Tools for BPF-based Linux IO analysis, networking, monitoring, and more

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

attach to specific address of user space spplication in c

Akbasniwal opened this issue · comments

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?