You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
The tests requirebpftool which can be installed in Ubuntu via thelinux-tools-generic package:
sudo apt-get install linux-tools-generic
Then, tests can be run:
cmake \ --build. \ --targettest
Importing btfparse in your project
This library is meant to be used as a git submodule:
Enter your project folder
Create the submodule:git submodule add https://github.com/trailofbits/btfparse
Import the library from your CMakeLists.txt file:add_subdirectory("btfparse")
Link the btfparse library against your target:target_link_libraries(your_target PRIVATE btfparse)
Examples
Tool example: dump-btf
The library comes with adump-btf tool that is output-compatible withbpftool. In order to build it, make sure to pass-DBTFPARSE_ENABLE_TOOLS=true at configure time.