16#ifndef LIEF_PE_EXCEPTION_INFO_H
17#define LIEF_PE_EXCEPTION_INFO_H
47 virtual std::unique_ptr<ExceptionInfo>
clone()
const = 0;
86 static_assert(std::is_base_of<ExceptionInfo, T>::value,
87 "Require ExceptionInfo inheritance");
88 if (T::classof(
this)) {
89 return static_cast<T*
>(
this);
100 void offset(uint64_t value) {
106 os << info.to_string();
111 ARCH arch_ = ARCH::UNKNOWN;
113 uint32_t offset_ = 0;
Class that is used to a read stream of data from different sources.
Definition BinaryStream.hpp:33
uint32_t rva_start() const
Function start address.
Definition ExceptionInfo.hpp:69
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:95
T * as()
Helper to downcast an ExceptionInfo into a concrete implementation.
Definition ExceptionInfo.hpp:85
static std::unique_ptr< ExceptionInfo > parse(Parser &ctx, BinaryStream &strm)
ExceptionInfo & operator=(ExceptionInfo &&)=default
ARCH
Arch discriminator for the subclasses.
Definition ExceptionInfo.hpp:50
ARCH arch() const
Target architecture of this exception.
Definition ExceptionInfo.hpp:64
virtual std::unique_ptr< ExceptionInfo > clone() const =0
ExceptionInfo(ExceptionInfo &&)=default
friend std::ostream & operator<<(std::ostream &os, const ExceptionInfo &info)
Definition ExceptionInfo.hpp:104
virtual ~ExceptionInfo()=default
ExceptionInfo & operator=(const ExceptionInfo &)=default
uint64_t offset() const
Offset in the binary where the raw exception information associated with this entry is defined.
Definition ExceptionInfo.hpp:75
static std::unique_ptr< ExceptionInfo > parse(Parser &ctx, BinaryStream &strm, Header::MACHINE_TYPES arch)
ExceptionInfo(ARCH arch, uint64_t rva)
Definition ExceptionInfo.hpp:56
Main interface to parse PE binaries. In particular, the static Parser::parse functions 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:40
#define LIEF_API
Definition visibility.h:43