|
LIEF: Library to Instrument Executable Formats Version 2.0.0
|
Configuration options for generated code from debug info. More...
#include <DebugDeclOpt.hpp>
Public Types | |
| using | type_aliases_t = std::unordered_map<std::string, std::string> |
| Mapping between a type name and a user-friendly aliases. (e.g. std::basic_string<char,std::char_traits<char>,std::allocator<char>> -> std::string). | |
Public Member Functions | |
| DeclOpt () | |
| DeclOpt (const DeclOpt &other) | |
| DeclOpt & | operator= (const DeclOpt &other) |
| DeclOpt (DeclOpt &&other) noexcept | |
| DeclOpt & | operator= (DeclOpt &&other) noexcept |
| ~DeclOpt () | |
| uint32_t | indentation () const |
| The number of spaces for indentation. | |
| DeclOpt & | indentation (uint32_t value) |
| bool | is_cpp () const |
| Prefer C++ syntax over C syntax. | |
| DeclOpt & | is_cpp (bool value) |
| bool | show_extended_annotations () const |
| Enable extended comments and annotations. | |
| DeclOpt & | show_extended_annotations (bool value) |
| bool | include_types () const |
| Include full type definitions. | |
| DeclOpt & | include_types (bool value) |
| bool | include_locals () const |
| Emit a function body listing its local / stack variables. | |
| DeclOpt & | include_locals (bool value) |
| bool | desugar () const |
| Resolve type aliases (sugar). | |
| DeclOpt & | desugar (bool value) |
| bool | show_field_offsets () const |
| Show the relative offset of each field/attribute in structures. | |
| DeclOpt & | show_field_offsets (bool value) |
| const type_aliases_t & | type_aliases () const |
| Mapping of type names to user-friendly aliases. | |
| DeclOpt & | type_aliases (type_aliases_t aliases) |
| DeclOpt & | add_type_alias (std::string name, std::string alias) |
| Register a single type alias. | |
| std::string_view | target_triple () const |
| The LLVM target (e.g. aarch64-unknown-linux-gnu) used to build the AST from which the definitions are generated. | |
| DeclOpt & | target_triple (std::string triple) |
Configuration options for generated code from debug info.
This structure configures how the debug information (DWARF/PDB) translated into an AST is generated. You can use it to configure the indentation, and the information to generate when translating DWARF/PDB into C++-like definitions
| using LIEF::DeclOpt::type_aliases_t = std::unordered_map<std::string, std::string> |
Mapping between a type name and a user-friendly aliases. (e.g. std::basic_string<char,std::char_traits<char>,std::allocator<char>> -> std::string).
| LIEF::DeclOpt::DeclOpt | ( | ) |
| LIEF::DeclOpt::DeclOpt | ( | const DeclOpt & | other | ) |
References DeclOpt().
|
noexcept |
References DeclOpt().
| LIEF::DeclOpt::~DeclOpt | ( | ) |
| DeclOpt & LIEF::DeclOpt::add_type_alias | ( | std::string | name, |
| std::string | alias ) |
Register a single type alias.
References DeclOpt(), and LIEF_LIFETIMEBOUND.
| bool LIEF::DeclOpt::desugar | ( | ) | const |
Resolve type aliases (sugar).
If true, typedef and type aliases are replaced by their underlying canonical types (e.g., uint32_t might become unsigned int).
| DeclOpt & LIEF::DeclOpt::desugar | ( | bool | value | ) |
References DeclOpt(), and LIEF_LIFETIMEBOUND.
| bool LIEF::DeclOpt::include_locals | ( | ) | const |
Emit a function body listing its local / stack variables.
| DeclOpt & LIEF::DeclOpt::include_locals | ( | bool | value | ) |
References DeclOpt(), and LIEF_LIFETIMEBOUND.
| bool LIEF::DeclOpt::include_types | ( | ) | const |
Include full type definitions.
If true, the output will contain the full definition of types (structs, enums, unions).
| DeclOpt & LIEF::DeclOpt::include_types | ( | bool | value | ) |
References DeclOpt(), and LIEF_LIFETIMEBOUND.
| uint32_t LIEF::DeclOpt::indentation | ( | ) | const |
The number of spaces for indentation.
| DeclOpt & LIEF::DeclOpt::indentation | ( | uint32_t | value | ) |
References DeclOpt(), and LIEF_LIFETIMEBOUND.
| bool LIEF::DeclOpt::is_cpp | ( | ) | const |
Prefer C++ syntax over C syntax.
If true, the output will use C++ features (e.g. bool keyword)
| DeclOpt & LIEF::DeclOpt::is_cpp | ( | bool | value | ) |
References DeclOpt(), and LIEF_LIFETIMEBOUND.
| bool LIEF::DeclOpt::show_extended_annotations | ( | ) | const |
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.
| DeclOpt & LIEF::DeclOpt::show_extended_annotations | ( | bool | value | ) |
References DeclOpt(), and LIEF_LIFETIMEBOUND.
| bool LIEF::DeclOpt::show_field_offsets | ( | ) | const |
Show the relative offset of each field/attribute in structures.
If true, every member of a structure is prefixed with its byte offset,
| DeclOpt & LIEF::DeclOpt::show_field_offsets | ( | bool | value | ) |
References DeclOpt(), and LIEF_LIFETIMEBOUND.
| std::string_view LIEF::DeclOpt::target_triple | ( | ) | const |
The LLVM target (e.g. aarch64-unknown-linux-gnu) used to build the AST from which the definitions are generated.
The target defines the size of the builtin types (e.g. long) and the register names used in the annotations. If empty (default), the target is inferred from the binary associated with the debug info.
References LIEF_LIFETIMEBOUND.
Referenced by target_triple().
| DeclOpt & LIEF::DeclOpt::target_triple | ( | std::string | triple | ) |
References DeclOpt(), LIEF_LIFETIMEBOUND, and target_triple().
| const type_aliases_t & LIEF::DeclOpt::type_aliases | ( | ) | const |
Mapping of type names to user-friendly aliases.
| DeclOpt & LIEF::DeclOpt::type_aliases | ( | type_aliases_t | aliases | ) |
References DeclOpt(), and LIEF_LIFETIMEBOUND.