16#ifndef LIEF_PE_UNWIND_CODE_X64_H
17#define LIEF_PE_UNWIND_CODE_X64_H
37 static std::unique_ptr<Code>
100 return code->
opcode() == OPCODE::ALLOC_LARGE ||
101 code->
opcode() == OPCODE::ALLOC_SMALL;
126 return code->
opcode() == OPCODE::PUSH_NONVOL;
152 return code->
opcode() == OPCODE::PUSH_MACHFRAME;
179 return code->
opcode() == OPCODE::SET_FPREG;
210 return code->
opcode() == OPCODE::SAVE_NONVOL ||
211 code->
opcode() == OPCODE::SAVE_NONVOL_FAR;
216 uint32_t offset_ = 0;
241 return code->
opcode() == OPCODE::SAVE_XMM128 ||
242 code->
opcode() == OPCODE::SAVE_XMM128_FAR;
247 uint32_t offset_ = 0;
275 return code->
opcode() == OPCODE::EPILOG;
296 return code->
opcode() == OPCODE::SPARE;
UNWIND_REG
Definition RuntimeFunctionX64.hpp:134
UNWIND_OPCODES
Definition RuntimeFunctionX64.hpp:65
std::string to_string() const override
Pretty representation.
static bool classof(const Code *code)
Definition UnwindCodeX64.hpp:99
Alloc(OPCODE op, size_t pos, uint32_t size)
Definition UnwindCodeX64.hpp:85
~Alloc() override=default
uint32_t size() const
The size allocated.
Definition UnwindCodeX64.hpp:91
OPCODE opcode() const
The original opcode.
Definition UnwindCodeX64.hpp:59
Code & operator=(const Code &)=default
Code & operator=(Code &&)=default
RuntimeFunctionX64::UNWIND_REG REG
Definition UnwindCodeX64.hpp:34
friend std::ostream & operator<<(std::ostream &os, const Code &code)
Definition UnwindCodeX64.hpp:71
Code(OPCODE opcode, uint32_t pos)
Definition UnwindCodeX64.hpp:49
uint32_t position() const
Offset in the prolog.
Definition UnwindCodeX64.hpp:64
RuntimeFunctionX64::UNWIND_OPCODES OPCODE
Definition UnwindCodeX64.hpp:33
Code(OPCODE opcode)
Definition UnwindCodeX64.hpp:54
Code(const Code &)=default
virtual std::string to_string() const
Pretty representation.
uint32_t size() const
Size of the epilog.
Definition UnwindCodeX64.hpp:266
std::string to_string() const override
Pretty representation.
Epilog(uint8_t flags, uint8_t size)
Definition UnwindCodeX64.hpp:255
static bool classof(const Code *code)
Definition UnwindCodeX64.hpp:274
uint8_t flags() const
Definition UnwindCodeX64.hpp:261
~Epilog() override=default
std::string to_string() const override
Pretty representation.
static bool classof(const Code *code)
Definition UnwindCodeX64.hpp:151
~PushMachFrame() override=default
uint8_t value() const
0 or 1
Definition UnwindCodeX64.hpp:143
PushMachFrame(uint8_t value, size_t pos)
Definition UnwindCodeX64.hpp:137
static bool classof(const Code *code)
Definition UnwindCodeX64.hpp:125
std::string to_string() const override
Pretty representation.
PushNonVol(REG reg, size_t pos)
Definition UnwindCodeX64.hpp:111
~PushNonVol() override=default
REG reg() const
The register pushed.
Definition UnwindCodeX64.hpp:119
~SaveNonVolatile() override=default
REG reg() const
Definition UnwindCodeX64.hpp:197
uint32_t offset() const
Definition UnwindCodeX64.hpp:201
SaveNonVolatile(OPCODE op, REG value, size_t pos, uint32_t offset)
Definition UnwindCodeX64.hpp:191
static bool classof(const Code *code)
Definition UnwindCodeX64.hpp:209
std::string to_string() const override
Pretty representation.
SaveXMM128(OPCODE op, uint8_t num, size_t pos, uint32_t offset)
Definition UnwindCodeX64.hpp:222
static bool classof(const Code *code)
Definition UnwindCodeX64.hpp:240
uint32_t offset() const
Definition UnwindCodeX64.hpp:232
uint8_t num() const
Definition UnwindCodeX64.hpp:228
~SaveXMM128() override=default
std::string to_string() const override
Pretty representation.
static bool classof(const Code *code)
Definition UnwindCodeX64.hpp:178
REG reg() const
Frame pointer register.
Definition UnwindCodeX64.hpp:170
SetFPReg(REG value, size_t pos)
Definition UnwindCodeX64.hpp:164
~SetFPReg() override=default
std::string to_string() const override
Pretty representation.
static bool classof(const Code *code)
Definition UnwindCodeX64.hpp:295
Spare()
Definition UnwindCodeX64.hpp:285
~Spare() override=default
std::string to_string() const override
Pretty representation.
Definition UnwindCodeX64.hpp:289
Definition SpanStream.hpp:32
This namespace wraps code related to PE-x64 unwinding code.
Definition RuntimeFunctionX64.hpp:34
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
LIEF namespace.
Definition Abstract/Binary.hpp:40
This structure represents the UNWIND_INFO which records the effects a function has on the stack point...
Definition RuntimeFunctionX64.hpp:142
#define LIEF_API
Definition visibility.h:41