LIEF: Library to Instrument Executable Formats Version 0.17.0
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
16#ifndef LIEF_PE_EXCEPTION_INFO_H
17#define LIEF_PE_EXCEPTION_INFO_H
35 static std::unique_ptr<ExceptionInfo>
parse(Parser& ctx, BinaryStream& strm);
36 static std::unique_ptr<ExceptionInfo>
parse(Parser& ctx, BinaryStream& strm,
37 Header::MACHINE_TYPES arch);
42 ExceptionInfo&
operator=(
const ExceptionInfo&) =
default;
45 ExceptionInfo&
operator=(ExceptionInfo&&) =
default;
47 virtual std::unique_ptr<ExceptionInfo>
clone()
const = 0;
61 ExceptionInfo(arch, 0)
81 static_assert(std::is_base_of<ExceptionInfo, T>::value,
82 "Require ExceptionInfo inheritance");
83 if (T::classof(
this)) {
84 return static_cast<T*
>(
this);
91 return const_cast<ExceptionInfo*
>(
this)->as<T>();
95 std::ostream&
operator<<(std::ostream& os,
const ExceptionInfo& info)
97 os << info.to_string();
102 ARCH arch_ = ARCH::UNKNOWN;
Class that is used to a read stream of data from different sources.
Definition BinaryStream.hpp:33
This class is the base class for any exception or runtime function entry.
Definition ExceptionInfo.hpp:33
uint32_t rva_start() const
Function start address.
Definition ExceptionInfo.hpp:70
virtual std::string to_string() const =0
ExceptionInfo(const ExceptionInfo &)=default
ExceptionInfo(ARCH arch)
Definition ExceptionInfo.hpp:60
const T * as() const
Definition ExceptionInfo.hpp:90
T * as()
Helper to downcast an ExceptionInfo into a concrete implementation.
Definition ExceptionInfo.hpp:80
static std::unique_ptr< ExceptionInfo > parse(Parser &ctx, BinaryStream &strm)
ExceptionInfo & operator=(ExceptionInfo &&)=default
ARCH arch() const
Target architecture of this exception.
Definition ExceptionInfo.hpp:65
virtual std::unique_ptr< ExceptionInfo > clone() const =0
ExceptionInfo(ExceptionInfo &&)=default
friend std::ostream & operator<<(std::ostream &os, const ExceptionInfo &info)
Definition ExceptionInfo.hpp:95
virtual ~ExceptionInfo()=default
ExceptionInfo & operator=(const ExceptionInfo &)=default
static std::unique_ptr< ExceptionInfo > parse(Parser &ctx, BinaryStream &strm, Header::MACHINE_TYPES arch)
ExceptionInfo(ARCH arch, uint64_t rva)
Definition ExceptionInfo.hpp:55
Main interface to parse PE binaries. In particular the static functions: Parser::parse should be used...
Definition PE/Parser.hpp:52
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
@ T
Definition AcceleratorCodes.hpp:97
LIEF namespace.
Definition Abstract/Binary.hpp:36
#define LIEF_API
Definition visibility.h:41