libabigail
Functions
abigail::btf Namespace Reference

Namespace of the reader for the BTF debug information. More...

Functions

elf_based_reader_sptr create_reader (const std::string &elf_path, const vector< char ** > &debug_info_root_paths, environment &env, bool load_all_types=false, bool linux_kernel_mode=false)
 Create and return a BTF reader (or front-end) which is an instance of btf::reader. More...
 

Detailed Description

Namespace of the reader for the BTF debug information.

Function Documentation

◆ create_reader()

elf_based_reader_sptr abigail::btf::create_reader ( const std::string &  elf_path,
const vector< char ** > &  debug_info_root_paths,
environment env,
bool  load_all_types = false,
bool  linux_kernel_mode = false 
)

Create and return a BTF reader (or front-end) which is an instance of btf::reader.

Parameters
elf_paththe path to the path to the elf file the reader is to be used for.
debug_info_root_pathsa vector to the paths to the directories under which the debug info is to be found for elf_path. Pass an empty vector if th debug info is not in a split file.
environmentthe environment used by the current context. This environment contains resources needed by the BTF reader and by the types and declarations that are to be created later. Note that ABI artifacts that are to be compared all need to be created within the same environment.

Please also note that the life time of this environment object must be greater than the life time of the resulting reader the context uses resources that are allocated in the environment.

Parameters
load_all_typesif set to false only the types that are reachable from publicly exported declarations (of functions and variables) are read. If set to true then all types found in the debug information are loaded.
linux_kernel_modeif set to true, then consider the special linux kernel symbol tables when determining if a symbol is exported or not.
Returns
a smart pointer to the resulting btf::reader.