bcc/python: fix attach kprobe/kretprobe using regex
authorHengqi Chen <chenhengqi@outlook.com>
Wed, 16 Jun 2021 16:01:21 +0000 (00:01 +0800)
committeryonghong-song <ys114321@gmail.com>
Thu, 17 Jun 2021 06:08:01 +0000 (23:08 -0700)
commit0567e717907baf3c5c6e2420b63932b19c07c1ec
treef91b379a649fbbf58768e2c2f02c01de96467bcc
parenta25ddf7806f8fd09a241d600478132dd4c138d7b
bcc/python: fix attach kprobe/kretprobe using regex

Attach kprobe/kretprobe using regular expression should fail
explicitly if no functions are traceable. Currently we catch
all exceptions and if no functions are available, program
continue with no BPF programs attached. In this commit, change
this behavior to explicitly report error to user.

Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
src/python/bcc/__init__.py