PDB and DWARF shares similar traits which are abstracted by the following classes: This class provides a generic interface for accessing debug information from different formats such as DWARF and PDB. Users can use this interface to access high-level debug features like resolving function addresses. See: LIEF::pdb::DebugInfo, LIEF::dwarf::DebugInfo Subclassed by LIEF::dwarf::DebugInfo, LIEF::pdb::DebugInfo Public Functions This function can be used to down cast a DebugInfo instance: Attempt to resolve the address of the function specified by Friends This structure holds a debug location (source filename & line). Configuration options for generated code from debug info. This structure configures how the debug information (DWARF/PDB) translated into an AST is generated. Public Members The number of spaces for indentation. Prefer C++ syntax over C syntax. If true, the output will use C++ features (e.g., Enable extended comments and annotations. If true, the generated code will include comments containing low-level details such as memory addresses, offsets, type sizes, and original source locations. Include full type definitions. If true, the output will contain the full definition of types (structs, enums, unions). Resolve type aliases (sugar). If true, C++¶
DebugInfo¶
inline const T *as() const¶std::unique_ptr<LIEF::Instruction> dbg = bin->debug_info();
if (const auto* dwarf = inst->as<LIEF::dwarf::DebugInfo>()) {
dwarf->find_function("main");
}
name.debug_location_t¶
DeclOpt¶
bool keyword)typedefs and type aliases are replaced by their underlying canonical types (e.g., uint32_t might become unsigned int).
Bases: object
This class provides a generic interface for accessing debug information from different formats such as DWARF and PDB.
Users can use this interface to access high-level debug features like resolving function addresses.
See: DebugInfo, lief.dwarf.DebugInfo
Bases: Enum
Attempt to resolve the address of the function specified by name.
The actual debug format (PDB/DWARF)
Bases: object
Configuration options for generated code from debug info.
This structure configures how the debug information (DWARF/PDB) translated into an AST is generated.
Resolve type aliases (sugar).
If true, typedef``s and type aliases are replaced by their underlying
canonical types (e.g., ``uint32_t might become unsigned int).
Include full type definitions.
If true, the output will contain the full definition of types (structs, enums, unions).
The number of spaces for indentation.
Prefer C++ syntax over C syntax.
If true, the output will use C++ features (e.g., bool keyword)
Enable extended comments and annotations.
If true, the generated code will include comments containing low-level details such as memory addresses, offsets, type sizes, and original source locations.