From 99b92e44e385b4013b6fc2dcffea4f574fffbd90 Mon Sep 17 00:00:00 2001 From: Pragyansh Chaturvedi Date: Wed, 22 Oct 2025 20:04:02 +0530 Subject: [PATCH] Fix exapmles/kprobes to use latest pylibbpf --- examples/kprobes.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/kprobes.py b/examples/kprobes.py index 5977d36..5c51563 100644 --- a/examples/kprobes.py +++ b/examples/kprobes.py @@ -1,4 +1,4 @@ -from pythonbpf import bpf, section, bpfglobal, BPF +from pythonbpf import bpf, section, bpfglobal, BPF, trace_pipe from ctypes import c_void_p, c_int64 @@ -23,7 +23,7 @@ def LICENSE() -> str: b = BPF() -b.load_and_attach() -while True: - print("running") -# Now cat /sys/kernel/debug/tracing/trace_pipe to see results of unlink kprobe. +b.load() +b.attach_all() +print("running") +trace_pipe()