C++

Exceptions

class LIEF::exception : public 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

exception(const exception &other)
exception(const std::string &msg)
exception(const char *msg)
const char *what(void) const noexcept override
~exception() noexcept
class LIEF::bad_file : public LIEF::exception

Subclassed by LIEF::bad_format

Public Functions

exception(const exception &other)
exception(const std::string &msg)
exception(const char *msg)
const char *what(void) const noexcept override
class LIEF::bad_format : public LIEF::bad_file

Public Functions

const char *what(void) const noexcept override
class LIEF::not_implemented : public LIEF::exception

Public Functions

exception(const exception &other)
exception(const std::string &msg)
exception(const char *msg)
const char *what(void) const noexcept override
class LIEF::not_supported : public LIEF::exception

Public Functions

exception(const exception &other)
exception(const std::string &msg)
exception(const char *msg)
const char *what(void) const noexcept override
class LIEF::integrity_error : public LIEF::exception

Public Functions

exception(const exception &other)
exception(const std::string &msg)
exception(const char *msg)
const char *what(void) const noexcept override
class LIEF::read_out_of_bound : public LIEF::exception

Public Functions

read_out_of_bound(uint64_t offset, uint64_t size)
read_out_of_bound(uint64_t offset)
exception(const exception &other)
exception(const std::string &msg)
exception(const char *msg)
const char *what(void) const noexcept override
class LIEF::not_found : public LIEF::exception

Public Functions

exception(const exception &other)
exception(const std::string &msg)
exception(const char *msg)
const char *what(void) const noexcept override
class LIEF::corrupted : public LIEF::exception

Public Functions

exception(const exception &other)
exception(const std::string &msg)
exception(const char *msg)
const char *what(void) const noexcept override
class LIEF::conversion_error : public LIEF::exception

Public Functions

exception(const exception &other)
exception(const std::string &msg)
exception(const char *msg)
const char *what(void) const noexcept override
class LIEF::type_error : public LIEF::exception

Public Functions

exception(const exception &other)
exception(const std::string &msg)
exception(const char *msg)
const char *what(void) const noexcept override
class LIEF::builder_error : public LIEF::exception

Public Functions

exception(const exception &other)
exception(const std::string &msg)
exception(const char *msg)
const char *what(void) const noexcept override
class LIEF::parser_error : public LIEF::exception

Public Functions

exception(const exception &other)
exception(const std::string &msg)
exception(const char *msg)
const char *what(void) const noexcept override
class LIEF::pe_error : public LIEF::exception

Subclassed by LIEF::pe_bad_section_name

Public Functions

exception(const exception &other)
exception(const std::string &msg)
exception(const char *msg)
const char *what(void) const noexcept override
class LIEF::pe_bad_section_name : public LIEF::pe_error

Public Functions

const char *what(void) const noexcept override

Iterators

template<class T, class ITERATOR_T = typename decay_t<T>::iterator>
class LIEF::ref_iterator : public 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

using container_type = T
using DT = decay_t<T>
using ref_t = typename ref_iterator::reference
using pointer_t = typename ref_iterator::pointer

Public Functions

ref_iterator(T container)
ref_iterator(const ref_iterator &copy)
ref_iterator operator=(ref_iterator other)
void swap(ref_iterator &other)
ref_iterator &operator++(void)
ref_iterator operator++(int)
ref_iterator &operator--(void)
ref_iterator operator--(int)
ref_iterator &operator+=(const typename ref_iterator::difference_type &movement)
ref_iterator &operator-=(const typename ref_iterator::difference_type &movement)
std::enable_if<not std::is_const<ref_t>::value, remove_const_t<ref_t>>::type operator[](size_t n)
add_const_t<ref_t> operator[](size_t n) const
ref_iterator operator+(typename ref_iterator::difference_type n) const
ref_iterator operator-(typename ref_iterator::difference_type n) const
ref_iterator::difference_type operator-(const ref_iterator &rhs) const
bool operator<(const ref_iterator &rhs) const
bool operator>(const ref_iterator &rhs) const
bool operator>=(const ref_iterator &rhs) const
bool operator<=(const ref_iterator &rhs) const
ref_iterator begin(void) const
ref_iterator cbegin(void) const
ref_iterator end(void) const
ref_iterator cend(void) const
bool operator==(const ref_iterator &other) const
bool operator!=(const ref_iterator &other) const
size_t size(void) const
std::enable_if<not std::is_const<ref_t>::value, remove_const_t<ref_t>>::type operator*()
template<typename U = typename DT::value_type>
std::enable_if<std::is_pointer<U>::value, add_const_t<ref_t>>::type operator*() const
template<typename U = typename DT::value_type>
std::enable_if<not std::is_pointer<U>::value, add_const_t<ref_t>>::type operator*() const
std::enable_if<not std::is_const<pointer_t>::value, pointer_t>::type operator->()
add_const_t<pointer_t> operator->() 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 : public 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

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

Public Functions

filter_iterator(T container, filter_t filter)
filter_iterator(T container, const std::vector<filter_t> &filters)
filter_iterator(T container)
filter_iterator(const filter_iterator &copy)
filter_iterator operator=(filter_iterator other)
void swap(filter_iterator &other)
filter_iterator &def(filter_t func)
filter_iterator &operator++()
filter_iterator operator++(int)
filter_iterator begin(void) const
filter_iterator cbegin(void) const
filter_iterator end(void) const
filter_iterator cend(void) const
std::enable_if<not std::is_const<ref_t>::value, remove_const_t<ref_t>>::type operator*()
template<typename U = typename DT::value_type>
std::enable_if<std::is_pointer<U>::value, add_const_t<ref_t>>::type operator*() const
template<typename U = typename DT::value_type>
std::enable_if<not std::is_pointer<U>::value, add_const_t<ref_t>>::type operator*() const
std::enable_if<not std::is_const<ref_t>::value, remove_const_t<ref_t>>::type operator[](size_t n)
add_const_t<ref_t> operator[](size_t n) const
std::enable_if<not std::is_const<pointer_t>::value, pointer_t>::type operator->()
add_const_t<pointer_t> operator->() const
size_t size(void) const
bool operator==(const filter_iterator &other) const
bool operator!=(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

void LIEF::logging::disable(void)

Disable the logging module.

void LIEF::logging::enable(void)

Enable the logging module.

void LIEF::logging::set_level(LOGGING_LEVEL level)

Change the logging level (hierarchical)

Logging levels

enum LIEF::logging::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:

enumerator LOG_TRACE
enumerator LOG_DEBUG
enumerator LOG_INFO
enumerator LOG_WARN
enumerator LOG_ERR
enumerator LOG_CRITICAL