C++

Exceptions

class LIEF::exception

Inherits from exception

Subclassed by LIEF::bad_file, LIEF::builder_error, LIEF::conversion_error, LIEF::corrupted, LIEF::integrity_error, LIEF::not_found, LIEF::not_implemented, LIEF::not_supported, LIEF::parser_error, LIEF::pe_error, LIEF::read_out_of_bound, LIEF::type_error

Public Functions

LIEF::exceptionexception(const exception &other)
LIEF::exceptionexception(const std::string &msg)
LIEF::exceptionexception(const char *msg)
const char *LIEF::exceptionwhat(void) const
LIEF::exception~exception()
class LIEF::bad_file

Inherits from LIEF::exception

Subclassed by LIEF::bad_format

class LIEF::bad_format

Inherits from LIEF::bad_file

class LIEF::not_implemented

Inherits from LIEF::exception

class LIEF::not_supported

Inherits from LIEF::exception

class LIEF::integrity_error

Inherits from LIEF::exception

class LIEF::read_out_of_bound

Inherits from LIEF::exception

Public Functions

LIEF::read_out_of_boundread_out_of_bound(uint64_t offset, uint64_t size)
LIEF::read_out_of_boundread_out_of_bound(uint64_t offset)
class LIEF::not_found

Inherits from LIEF::exception

class LIEF::corrupted

Inherits from LIEF::exception

class LIEF::conversion_error

Inherits from LIEF::exception

class LIEF::type_error

Inherits from LIEF::exception

class LIEF::builder_error

Inherits from LIEF::exception

class LIEF::parser_error

Inherits from LIEF::exception

class LIEF::pe_error

Inherits from LIEF::exception

Subclassed by LIEF::pe_bad_section_name

class LIEF::pe_bad_section_name

Inherits from LIEF::pe_error

Iterators

template <class T, class ITERATOR_T = typename decay_t<T>::iterator>
class LIEF::ref_iterator

Inherits from std::iterator< std::bidirectional_iterator_tag, decay_t< T >::value_type, ptrdiff_t, std::remove_pointer< decay_t< T >::value_type >::type *, std::remove_pointer< decay_t< T >::value_type >::type &>

Public Types

template<>
using LIEF::ref_iterator<T, ITERATOR_T>container_type = T
template<>
using LIEF::ref_iterator<T, ITERATOR_T>DT = decay_t<T>
template<>
using LIEF::ref_iterator<T, ITERATOR_T>ref_t = typename ref_iterator::reference
template<>
using LIEF::ref_iterator<T, ITERATOR_T>pointer_t = typename ref_iterator::pointer

Public Functions

LIEF::ref_iteratorref_iterator(T container)
LIEF::ref_iteratorref_iterator(const ref_iterator &copy)
ref_iterator LIEF::ref_iteratoroperator=(ref_iterator other)
void LIEF::ref_iteratorswap(ref_iterator &other)
ref_iterator &LIEF::ref_iteratoroperator++(void)
ref_iterator LIEF::ref_iteratoroperator++(int)
ref_iterator &LIEF::ref_iteratoroperator--(void)
ref_iterator LIEF::ref_iteratoroperator--(int)
ref_iterator &LIEF::ref_iteratoroperator+=(const typename ref_iterator::difference_type &movement)
ref_iterator &LIEF::ref_iteratoroperator-=(const typename ref_iterator::difference_type &movement)
std::enable_if<not std::is_const<ref_t>::value, remove_const_t<ref_t>>::type LIEF::ref_iteratoroperator[](size_t n)
add_const_t<ref_t> LIEF::ref_iteratoroperator[](size_t n) const
ref_iterator LIEF::ref_iteratoroperator+(typename ref_iterator::difference_type n) const
ref_iterator LIEF::ref_iteratoroperator-(typename ref_iterator::difference_type n) const
ref_iterator::difference_type LIEF::ref_iteratoroperator-(const ref_iterator &rhs) const
bool LIEF::ref_iteratoroperator<(const ref_iterator &rhs) const
bool LIEF::ref_iteratoroperator>(const ref_iterator &rhs) const
bool LIEF::ref_iteratoroperator>=(const ref_iterator &rhs) const
bool LIEF::ref_iteratoroperator<=(const ref_iterator &rhs) const
ref_iterator LIEF::ref_iteratorbegin(void) const
ref_iterator LIEF::ref_iteratorcbegin(void) const
ref_iterator LIEF::ref_iteratorend(void) const
ref_iterator LIEF::ref_iteratorcend(void) const
bool LIEF::ref_iteratoroperator==(const ref_iterator &other) const
bool LIEF::ref_iteratoroperator!=(const ref_iterator &other) const
size_t LIEF::ref_iteratorsize(void) const
std::enable_if<not std::is_const<ref_t>::value, remove_const_t<ref_t>>::type LIEF::ref_iteratoroperator*()
template <typename U = typename DT::value_type>
std::enable_if<std::is_pointer<U>::value, add_const_t<ref_t>>::type LIEF::ref_iteratoroperator*() const
template <typename U = typename DT::value_type>
std::enable_if<not std::is_pointer<U>::value, add_const_t<ref_t>>::type LIEF::ref_iteratoroperator*() const
std::enable_if<not std::is_const<pointer_t>::value, pointer_t>::type LIEF::ref_iteratoroperator->()
add_const_t<pointer_t> LIEF::ref_iteratoroperator->() const

Warning

doxygenclass: Cannot find class “LIEF::const_ref_iterator” in doxygen xml output for project “lief” from directory: /tmp/LIEF/LIEF/build/doc/doxygen/xml

template <class T, class ITERATOR_T = typename decay_t<T>::iterator>
class LIEF::filter_iterator

Inherits from std::iterator< std::forward_iterator_tag, decay_t< T >::value_type, ptrdiff_t, std::remove_pointer< decay_t< T >::value_type >::type *, std::remove_pointer< decay_t< T >::value_type >::type &>

Public Types

template<>
using LIEF::filter_iterator<T, ITERATOR_T>container_type = T
template<>
using LIEF::filter_iterator<T, ITERATOR_T>DT = decay_t<T>
template<>
using LIEF::filter_iterator<T, ITERATOR_T>ref_t = typename filter_iterator::reference
template<>
using LIEF::filter_iterator<T, ITERATOR_T>pointer_t = typename filter_iterator::pointer
template<>
using LIEF::filter_iterator<T, ITERATOR_T>filter_t = std::function<bool(const typename DT::value_type&)>

Public Functions

LIEF::filter_iteratorfilter_iterator(T container, filter_t filter)
LIEF::filter_iteratorfilter_iterator(T container, const std::vector<filter_t> &filters)
LIEF::filter_iteratorfilter_iterator(T container)
LIEF::filter_iteratorfilter_iterator(const filter_iterator &copy)
filter_iterator LIEF::filter_iteratoroperator=(filter_iterator other)
void LIEF::filter_iteratorswap(filter_iterator &other)
filter_iterator &LIEF::filter_iteratordef(filter_t func)
filter_iterator &LIEF::filter_iteratoroperator++()
filter_iterator LIEF::filter_iteratoroperator++(int)
filter_iterator LIEF::filter_iteratorbegin(void) const
filter_iterator LIEF::filter_iteratorcbegin(void) const
filter_iterator LIEF::filter_iteratorend(void) const
filter_iterator LIEF::filter_iteratorcend(void) const
std::enable_if<not std::is_const<ref_t>::value, remove_const_t<ref_t>>::type LIEF::filter_iteratoroperator*()
template <typename U = typename DT::value_type>
std::enable_if<std::is_pointer<U>::value, add_const_t<ref_t>>::type LIEF::filter_iteratoroperator*() const
template <typename U = typename DT::value_type>
std::enable_if<not std::is_pointer<U>::value, add_const_t<ref_t>>::type LIEF::filter_iteratoroperator*() const
std::enable_if<not std::is_const<ref_t>::value, remove_const_t<ref_t>>::type LIEF::filter_iteratoroperator[](size_t n)
add_const_t<ref_t> LIEF::filter_iteratoroperator[](size_t n) const
std::enable_if<not std::is_const<pointer_t>::value, pointer_t>::type LIEF::filter_iteratoroperator->()
add_const_t<pointer_t> LIEF::filter_iteratoroperator->() const
size_t LIEF::filter_iteratorsize(void) const
bool LIEF::filter_iteratoroperator==(const filter_iterator &other) const
bool LIEF::filter_iteratoroperator!=(const filter_iterator &other) const

Warning

doxygenclass: Cannot find class “LIEF::const_filter_iterator” in doxygen xml output for project “lief” from directory: /tmp/LIEF/LIEF/build/doc/doxygen/xml

Logging

class LIEF::Logger

Public Functions

LIEF::LoggerLogger(void)
LIEF::LoggerLogger(const Logger&)
Logger &LIEF::Loggeroperator=(const Logger&)
LIEF::Logger~Logger(void)

Public Static Functions

void LIEF::Loggerdisable(void)

Disable the logging module.

void LIEF::Loggerenable(void)

Enable the logging module.

void LIEF::Loggerset_level(LOGGING_LEVEL level)

Change the logging level (hierarchical)

void LIEF::Loggerset_verbose_level(uint32_t level)

Change the verbose level.

Logging levels

enum LIEF::LOGGING_LEVEL

Hierarchical logging level

From a given level set, all levels below this level are enabled

For example, if LOG_FATAL is enabled then LOG_ERROR, LOG_WARNING are also enabled

Values:

LIEFLOG_GLOBAL = 1
LIEFLOG_TRACE = 2
LIEFLOG_DEBUG = 4
LIEFLOG_FATAL = 8
LIEFLOG_ERROR = 16
LIEFLOG_WARNING = 32
LIEFLOG_INFO = 64
LIEFLOG_VERBOSE = 128
LIEFLOG_UNKNOWN = 1010