LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
LIEF::PE::unwind_aarch64::PackedFunction Class Reference

This class represents a packed AArch64 exception entry. More...

#include <PackedFunction.hpp>

Inheritance diagram for LIEF::PE::unwind_aarch64::PackedFunction:
Collaboration diagram for LIEF::PE::unwind_aarch64::PackedFunction:

Public Member Functions

 PackedFunction (const PackedFunction &)=default
 
PackedFunctionoperator= (const PackedFunction &)=default
 
 PackedFunction (PackedFunction &&)=default
 
PackedFunctionoperator= (PackedFunction &&)=default
 
 ~PackedFunction () override=default
 
std::unique_ptr< ExceptionInfoclone () const override
 
std::string to_string () const override
 
uint8_t frame_size () const
 Size of the allocated stack.
 
uint8_t reg_I () const
 Number of non-volatile INT registers (x19-x28) saved in the canonical stack location.
 
uint8_t reg_F () const
 Number of non-volatile FP registers (d8-d15) saved in the canonical stack location.
 
uint8_t H () const
 1-bit flag indicating whether the function homes the integer parameter registers (x0-x7) by storing them at the very start of the function. (0 = doesn't home registers, 1 = homes registers).
 
uint8_t CR () const
 Flag indicating whether the function includes extra instructions to set up a frame chain and return link.
 
PackedFunctionframe_size (uint8_t value)
 
PackedFunctionreg_I (uint8_t value)
 
PackedFunctionreg_F (uint8_t value)
 
PackedFunctionH (uint8_t value)
 
PackedFunctionCR (uint8_t value)
 
 RuntimeFunctionAArch64 (uint64_t RVA, uint32_t length, PACKED_FLAGS flag)
 
 RuntimeFunctionAArch64 (const RuntimeFunctionAArch64 &)=default
 
 RuntimeFunctionAArch64 (RuntimeFunctionAArch64 &&)=default
 
- Public Member Functions inherited from LIEF::PE::RuntimeFunctionAArch64
 RuntimeFunctionAArch64 (uint64_t RVA, uint32_t length, PACKED_FLAGS flag)
 
 RuntimeFunctionAArch64 (const RuntimeFunctionAArch64 &)=default
 
RuntimeFunctionAArch64operator= (const RuntimeFunctionAArch64 &)=default
 
 RuntimeFunctionAArch64 (RuntimeFunctionAArch64 &&)=default
 
RuntimeFunctionAArch64operator= (RuntimeFunctionAArch64 &&)=default
 
std::unique_ptr< ExceptionInfoclone () const override
 
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.
 
std::string to_string () const override
 
 ~RuntimeFunctionAArch64 ()=default
 
- Public Member Functions inherited from LIEF::PE::ExceptionInfo
 ExceptionInfo ()=delete
 
 ExceptionInfo (const ExceptionInfo &)=default
 
ExceptionInfooperator= (const ExceptionInfo &)=default
 
 ExceptionInfo (ExceptionInfo &&)=default
 
ExceptionInfooperator= (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 >
Tas ()
 Helper to downcast an ExceptionInfo into a concrete implementation.
 
template<class T >
const Tas () const
 

Static Public Member Functions

static std::unique_ptr< PackedFunctionparse (Parser &ctx, BinaryStream &strm, uint32_t rva, uint32_t unwind_data)
 
static bool classof (const ExceptionInfo *info)
 
- Static Public Member Functions inherited from LIEF::PE::RuntimeFunctionAArch64
static std::unique_ptr< RuntimeFunctionAArch64parse (Parser &ctx, BinaryStream &strm)
 
static bool classof (const ExceptionInfo *info)
 
- Static Public Member Functions inherited from LIEF::PE::ExceptionInfo
static std::unique_ptr< ExceptionInfoparse (Parser &ctx, BinaryStream &strm)
 
static std::unique_ptr< ExceptionInfoparse (Parser &ctx, BinaryStream &strm, Header::MACHINE_TYPES arch)
 

Additional Inherited Members

- Public Types inherited from LIEF::PE::RuntimeFunctionAArch64
enum class  PACKED_FLAGS { UNPACKED = 0 , PACKED = 1 , PACKED_FRAGMENT = 2 , RESERVED = 3 }
 
- Public Types inherited from LIEF::PE::ExceptionInfo
enum class  ARCH { UNKNOWN = 0 , ARM64 , X86_64 }
 Arch discriminator for the subclasses. More...
 

Detailed Description

This class represents a packed AArch64 exception entry.

An excepted entry can be packed if the unwind data fit in 30 bits

Reference: https://learn.microsoft.com/en-us/cpp/build/arm64-exception-handling?view=msvc-170#packed-unwind-data

Constructor & Destructor Documentation

◆ PackedFunction() [1/2]

LIEF::PE::unwind_aarch64::PackedFunction::PackedFunction ( const PackedFunction & )
default

◆ PackedFunction() [2/2]

LIEF::PE::unwind_aarch64::PackedFunction::PackedFunction ( PackedFunction && )
default

◆ ~PackedFunction()

LIEF::PE::unwind_aarch64::PackedFunction::~PackedFunction ( )
overridedefault

Member Function Documentation

◆ classof()

static bool LIEF::PE::unwind_aarch64::PackedFunction::classof ( const ExceptionInfo * info)
inlinestatic

◆ clone()

std::unique_ptr< ExceptionInfo > LIEF::PE::unwind_aarch64::PackedFunction::clone ( ) const
inlineoverridevirtual

◆ CR() [1/2]

uint8_t LIEF::PE::unwind_aarch64::PackedFunction::CR ( ) const
inline

Flag indicating whether the function includes extra instructions to set up a frame chain and return link.

◆ CR() [2/2]

PackedFunction & LIEF::PE::unwind_aarch64::PackedFunction::CR ( uint8_t value)
inline

◆ frame_size() [1/2]

uint8_t LIEF::PE::unwind_aarch64::PackedFunction::frame_size ( ) const
inline

Size of the allocated stack.

◆ frame_size() [2/2]

PackedFunction & LIEF::PE::unwind_aarch64::PackedFunction::frame_size ( uint8_t value)
inline

◆ H() [1/2]

uint8_t LIEF::PE::unwind_aarch64::PackedFunction::H ( ) const
inline

1-bit flag indicating whether the function homes the integer parameter registers (x0-x7) by storing them at the very start of the function. (0 = doesn't home registers, 1 = homes registers).

◆ H() [2/2]

PackedFunction & LIEF::PE::unwind_aarch64::PackedFunction::H ( uint8_t value)
inline

◆ operator=() [1/2]

PackedFunction & LIEF::PE::unwind_aarch64::PackedFunction::operator= ( const PackedFunction & )
default

◆ operator=() [2/2]

PackedFunction & LIEF::PE::unwind_aarch64::PackedFunction::operator= ( PackedFunction && )
default

◆ parse()

static std::unique_ptr< PackedFunction > LIEF::PE::unwind_aarch64::PackedFunction::parse ( Parser & ctx,
BinaryStream & strm,
uint32_t rva,
uint32_t unwind_data )
static

◆ reg_F() [1/2]

uint8_t LIEF::PE::unwind_aarch64::PackedFunction::reg_F ( ) const
inline

Number of non-volatile FP registers (d8-d15) saved in the canonical stack location.

◆ reg_F() [2/2]

PackedFunction & LIEF::PE::unwind_aarch64::PackedFunction::reg_F ( uint8_t value)
inline

◆ reg_I() [1/2]

uint8_t LIEF::PE::unwind_aarch64::PackedFunction::reg_I ( ) const
inline

Number of non-volatile INT registers (x19-x28) saved in the canonical stack location.

◆ reg_I() [2/2]

PackedFunction & LIEF::PE::unwind_aarch64::PackedFunction::reg_I ( uint8_t value)
inline

◆ RuntimeFunctionAArch64() [1/3]

LIEF::PE::RuntimeFunctionAArch64::RuntimeFunctionAArch64 ( const RuntimeFunctionAArch64 & )
default

◆ RuntimeFunctionAArch64() [2/3]

LIEF::PE::RuntimeFunctionAArch64::RuntimeFunctionAArch64 ( RuntimeFunctionAArch64 && )
default

◆ RuntimeFunctionAArch64() [3/3]

LIEF::PE::RuntimeFunctionAArch64::RuntimeFunctionAArch64 ( uint64_t RVA,
uint32_t length,
PACKED_FLAGS flag )
inline

◆ to_string()

std::string LIEF::PE::unwind_aarch64::PackedFunction::to_string ( ) const
overridevirtual

The documentation for this class was generated from the following file: