LIEF: Library to Instrument Executable Formats Version 0.17.0
|
This class represents an unpacked AArch64 exception entry. More...
#include <UnpackedFunction.hpp>
Classes | |
struct | epilog_scope_t |
This strucure describes an epilog scope. More... | |
Public Types | |
using | epilog_scopes_t = std::vector<epilog_scope_t> |
using | it_epilog_scopes = ref_iterator<epilog_scopes_t&> |
using | it_const_epilog_scopes = const_ref_iterator<const epilog_scopes_t&> |
![]() | |
enum class | PACKED_FLAGS { UNPACKED = 0 , PACKED = 1 , PACKED_FRAGMENT = 2 , RESERVED = 3 } |
![]() | |
enum class | ARCH { UNKNOWN = 0 , ARM64 , X86_64 } |
Arch discriminator for the subclasses. More... | |
Public Member Functions | |
UnpackedFunction (uint32_t rva, uint32_t length) | |
UnpackedFunction (const UnpackedFunction &)=default | |
UnpackedFunction & | operator= (const UnpackedFunction &)=default |
UnpackedFunction (UnpackedFunction &&)=default | |
UnpackedFunction & | operator= (UnpackedFunction &&)=default |
~UnpackedFunction () override=default | |
std::unique_ptr< ExceptionInfo > | clone () const override |
std::string | to_string () const override |
uint32_t | xdata_rva () const |
RVA where this unpacked data is located (usually pointing in .xdata ) | |
uint32_t | version () const |
Describes the version of the remaining .xdata . | |
uint8_t | X () const |
1-bit field that indicates the presence (1) or absence (0) of exception data. | |
uint8_t | E () const |
1-bit field that indicates that information describing a single epilog is packed into the header (1) rather than requiring more scope words later (0). | |
uint16_t | epilog_count () const |
If E() == 0, specifies the count of the total number of epilog scopes. Otherwise, return 0 | |
uint16_t | epilog_offset () const |
If E() == 1, index of the first unwind code that describes the one and only epilog. | |
uint32_t | code_words () const |
Number of 32-bit words needed to contain all of the unwind codes. | |
uint32_t | exception_handler () const |
Exception handler RVA (if any) | |
span< const uint8_t > | unwind_code () const |
Bytes that contain the unwind codes. | |
span< uint8_t > | unwind_code () |
it_epilog_scopes | epilog_scopes () |
Iterator over the epilog scopes. | |
it_const_epilog_scopes | epilog_scopes () const |
UnpackedFunction & | xdata_rva (uint32_t value) |
UnpackedFunction & | version (uint32_t value) |
UnpackedFunction & | X (uint8_t value) |
UnpackedFunction & | E (uint8_t value) |
UnpackedFunction & | epilog_cnt_offset (uint16_t value) |
UnpackedFunction & | code_words (uint32_t value) |
UnpackedFunction & | exception_handler (uint32_t value) |
UnpackedFunction & | epilog_scopes (epilog_scopes_t scopes) |
UnpackedFunction & | unwind_code (std::vector< uint8_t > code) |
![]() | |
RuntimeFunctionAArch64 (uint64_t RVA, uint32_t length, PACKED_FLAGS flag) | |
RuntimeFunctionAArch64 (const RuntimeFunctionAArch64 &)=default | |
RuntimeFunctionAArch64 & | operator= (const RuntimeFunctionAArch64 &)=default |
RuntimeFunctionAArch64 (RuntimeFunctionAArch64 &&)=default | |
RuntimeFunctionAArch64 & | operator= (RuntimeFunctionAArch64 &&)=default |
uint32_t | length () const |
Length of the function in bytes. | |
PACKED_FLAGS | flag () const |
Flag describing the format the unwind data. | |
uint32_t | rva_end () const |
Function end address. | |
~RuntimeFunctionAArch64 ()=default | |
![]() | |
ExceptionInfo ()=delete | |
ExceptionInfo (const ExceptionInfo &)=default | |
ExceptionInfo & | operator= (const ExceptionInfo &)=default |
ExceptionInfo (ExceptionInfo &&)=default | |
ExceptionInfo & | operator= (ExceptionInfo &&)=default |
ExceptionInfo (ARCH arch, uint64_t rva) | |
ExceptionInfo (ARCH arch) | |
ARCH | arch () const |
Target architecture of this exception. | |
uint32_t | rva_start () const |
Function start address. | |
virtual | ~ExceptionInfo ()=default |
template<class T > | |
T * | as () |
Helper to downcast an ExceptionInfo into a concrete implementation. | |
template<class T > | |
const T * | as () const |
Static Public Member Functions | |
static std::unique_ptr< UnpackedFunction > | parse (Parser &ctx, BinaryStream &strm, uint32_t xdata_rva, uint32_t rva) |
static bool | classof (const ExceptionInfo *info) |
![]() | |
static std::unique_ptr< RuntimeFunctionAArch64 > | parse (Parser &ctx, BinaryStream &strm) |
static bool | classof (const ExceptionInfo *info) |
![]() | |
static std::unique_ptr< ExceptionInfo > | parse (Parser &ctx, BinaryStream &strm) |
static std::unique_ptr< ExceptionInfo > | parse (Parser &ctx, BinaryStream &strm, Header::MACHINE_TYPES arch) |
This class represents an unpacked AArch64 exception entry.
Reference: https://learn.microsoft.com/en-us/cpp/build/arm64-exception-handling?view=msvc-170#xdata-records
using LIEF::PE::unwind_aarch64::UnpackedFunction::epilog_scopes_t = std::vector<epilog_scope_t> |
using LIEF::PE::unwind_aarch64::UnpackedFunction::it_const_epilog_scopes = const_ref_iterator<const epilog_scopes_t&> |
|
inline |
|
default |
|
default |
|
overridedefault |
|
inlinestatic |
|
inlineoverridevirtual |
Reimplemented from LIEF::PE::RuntimeFunctionAArch64.
|
inline |
Number of 32-bit words needed to contain all of the unwind codes.
|
inline |
|
inline |
1-bit field that indicates that information describing a single epilog is packed into the header (1) rather than requiring more scope words later (0).
|
inline |
|
inline |
|
inline |
If E() == 0, specifies the count of the total number of epilog scopes. Otherwise, return 0
References LIEF::PE::E.
|
inline |
If E() == 1, index of the first unwind code that describes the one and only epilog.
References LIEF::PE::E.
|
inline |
Iterator over the epilog scopes.
|
inline |
|
inline |
|
inline |
Exception handler RVA (if any)
|
inline |
|
default |
|
default |
|
static |
|
overridevirtual |
Reimplemented from LIEF::PE::RuntimeFunctionAArch64.
|
inline |
|
inline |
Bytes that contain the unwind codes.
|
inline |
|
inline |
Describes the version of the remaining .xdata
.
Currently (2025-01-04), only version 0 is defined, so values of 1-3 aren't permitted.
|
inline |
|
inline |
1-bit field that indicates the presence (1) or absence (0) of exception data.
|
inline |
|
inline |
RVA where this unpacked data is located (usually pointing in .xdata
)
|
inline |
uint32_t LIEF::PE::unwind_aarch64::UnpackedFunction::epilog_count_ |
uint32_t LIEF::PE::unwind_aarch64::UnpackedFunction::epilog_offset_ = 0 |