Class that represents a COFF Binary.
More...
#include <Binary.hpp>
Class that represents a COFF Binary.
◆ instructions_it
◆ it_const_function
Iterator which outputs COFF symbols representing functions.
◆ it_const_relocations
◆ it_const_sections
Iterator that outputs const Section& object.
◆ it_const_strings_table
Iterator that outputs const String& object.
◆ it_const_symbols
Iterator that outputs Symbol& object.
◆ it_functions
Iterator which outputs COFF symbols representing functions.
◆ it_relocations
◆ it_sections
Iterator that outputs Section& object.
◆ it_strings_table
Iterator that outputs String& object.
◆ it_symbols
Iterator that outputs Symbol& object.
◆ relocations_t
Internal container used to store COFF's relocations.
◆ sections_t
Internal container used to store COFF's section.
◆ strings_table_t
Internal container used to store COFF's strings.
◆ symbols_t
Internal container used to store COFF's symbols.
◆ ~Binary()
LIEF::COFF::Binary::~Binary |
( |
| ) |
|
◆ disassemble() [1/6]
instructions_it LIEF::COFF::Binary::disassemble |
( |
const std::string & | symbol | ) |
const |
Disassemble code for the given symbol name.
auto insts = binary->disassemble("main");
for (std::unique_ptr<assembly::Instruction> inst : insts) {
std::cout << inst->to_string() << '\n';
}
- See also
- LIEF::assembly::Instruction
◆ disassemble() [2/6]
instructions_it LIEF::COFF::Binary::disassemble |
( |
const std::vector< uint8_t > & | buffer, |
|
|
uint64_t | address = 0 ) const |
|
inline |
◆ disassemble() [3/6]
Disassemble code for the given symbol.
const Symbol* func = binary->find_demangled_function("int __cdecl my_function(int, int)");
auto insts = binary->disassemble(*func);
for (std::unique_ptr<assembly::Instruction> inst : insts) {
std::cout << inst->to_string() << '\n';
}
- See also
- LIEF::assembly::Instruction
◆ disassemble() [4/6]
instructions_it LIEF::COFF::Binary::disassemble |
( |
const uint8_t * | buffer, |
|
|
size_t | size, |
|
|
uint64_t | address = 0 ) const |
◆ disassemble() [5/6]
◆ disassemble() [6/6]
◆ find_demangled_function() [1/2]
Symbol * LIEF::COFF::Binary::find_demangled_function |
( |
const std::string & | name | ) |
|
|
inline |
◆ find_demangled_function() [2/2]
const Symbol * LIEF::COFF::Binary::find_demangled_function |
( |
const std::string & | name | ) |
const |
Try to find the function (symbol) with the given demangled name.
◆ find_function() [1/2]
Symbol * LIEF::COFF::Binary::find_function |
( |
const std::string & | name | ) |
|
|
inline |
◆ find_function() [2/2]
const Symbol * LIEF::COFF::Binary::find_function |
( |
const std::string & | name | ) |
const |
Try to find the function (symbol) with the given name.
◆ find_string() [1/2]
String * LIEF::COFF::Binary::find_string |
( |
uint32_t | offset | ) |
|
|
inline |
Try to find the COFF string at the given offset in the COFF string table.
- Warning
- This offset must include the first 4 bytes holding the size of the table. Hence, the first string starts a the offset 4.
◆ find_string() [2/2]
const String * LIEF::COFF::Binary::find_string |
( |
uint32_t | offset | ) |
const |
|
inline |
◆ functions() [1/2]
◆ functions() [2/2]
Iterator over the functions implemented in this COFF.
◆ header() [1/2]
Header & LIEF::COFF::Binary::header |
( |
| ) |
|
|
inline |
◆ header() [2/2]
const Header & LIEF::COFF::Binary::header |
( |
| ) |
const |
|
inline |
◆ relocations() [1/2]
Iterator over all the relocations used by this COFF binary.
◆ relocations() [2/2]
◆ sections() [1/2]
Iterator over the different sections located in this COFF binary.
◆ sections() [2/2]
◆ string_table() [1/2]
◆ string_table() [2/2]
Iterator over the COFF's strings.
◆ symbols() [1/2]
Iterator over the COFF's symbols.
◆ symbols() [2/2]
◆ to_string()
std::string LIEF::COFF::Binary::to_string |
( |
| ) |
const |
The documentation for this class was generated from the following file: