16#ifndef LIEF_PE_UNWIND_CODE_X64_H
17#define LIEF_PE_UNWIND_CODE_X64_H
37 static std::unique_ptr<Code>
98 return code->
opcode() == OPCODE::ALLOC_LARGE ||
99 code->
opcode() == OPCODE::ALLOC_SMALL;
124 return code->
opcode() == OPCODE::PUSH_NONVOL;
149 return code->
opcode() == OPCODE::PUSH_MACHFRAME;
175 return code->
opcode() == OPCODE::SET_FPREG;
205 return code->
opcode() == OPCODE::SAVE_NONVOL ||
206 code->
opcode() == OPCODE::SAVE_NONVOL_FAR;
211 uint32_t offset_ = 0;
235 return code->
opcode() == OPCODE::SAVE_XMM128 ||
236 code->
opcode() == OPCODE::SAVE_XMM128_FAR;
241 uint32_t offset_ = 0;
268 return code->
opcode() == OPCODE::EPILOG;
288 return code->
opcode() == OPCODE::SPARE;
UNWIND_REG
Definition RuntimeFunctionX64.hpp:133
UNWIND_OPCODES
Definition RuntimeFunctionX64.hpp:64
std::string to_string() const override
Pretty representation.
static bool classof(const Code *code)
Definition UnwindCodeX64.hpp:97
Alloc(OPCODE op, size_t pos, uint32_t size)
Definition UnwindCodeX64.hpp:84
~Alloc() override=default
uint32_t size() const
The size allocated.
Definition UnwindCodeX64.hpp:89
OPCODE opcode() const
The original opcode.
Definition UnwindCodeX64.hpp:58
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:70
Code(OPCODE opcode, uint32_t pos)
Definition UnwindCodeX64.hpp:50
uint32_t position() const
Offset in the prolog.
Definition UnwindCodeX64.hpp:63
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:259
std::string to_string() const override
Pretty representation.
Epilog(uint8_t flags, uint8_t size)
Definition UnwindCodeX64.hpp:249
static bool classof(const Code *code)
Definition UnwindCodeX64.hpp:267
uint8_t flags() const
Definition UnwindCodeX64.hpp:254
~Epilog() override=default
std::string to_string() const override
Pretty representation.
static bool classof(const Code *code)
Definition UnwindCodeX64.hpp:148
~PushMachFrame() override=default
uint8_t value() const
0 or 1
Definition UnwindCodeX64.hpp:140
PushMachFrame(uint8_t value, size_t pos)
Definition UnwindCodeX64.hpp:135
static bool classof(const Code *code)
Definition UnwindCodeX64.hpp:123
std::string to_string() const override
Pretty representation.
PushNonVol(REG reg, size_t pos)
Definition UnwindCodeX64.hpp:110
~PushNonVol() override=default
REG reg() const
The register pushed.
Definition UnwindCodeX64.hpp:117
~SaveNonVolatile() override=default
REG reg() const
Definition UnwindCodeX64.hpp:192
uint32_t offset() const
Definition UnwindCodeX64.hpp:196
SaveNonVolatile(OPCODE op, REG value, size_t pos, uint32_t offset)
Definition UnwindCodeX64.hpp:187
static bool classof(const Code *code)
Definition UnwindCodeX64.hpp:204
std::string to_string() const override
Pretty representation.
SaveXMM128(OPCODE op, uint8_t num, size_t pos, uint32_t offset)
Definition UnwindCodeX64.hpp:217
static bool classof(const Code *code)
Definition UnwindCodeX64.hpp:234
uint32_t offset() const
Definition UnwindCodeX64.hpp:226
uint8_t num() const
Definition UnwindCodeX64.hpp:222
~SaveXMM128() override=default
std::string to_string() const override
Pretty representation.
static bool classof(const Code *code)
Definition UnwindCodeX64.hpp:174
REG reg() const
Frame pointer register.
Definition UnwindCodeX64.hpp:166
SetFPReg(REG value, size_t pos)
Definition UnwindCodeX64.hpp:161
~SetFPReg() override=default
std::string to_string() const override
Pretty representation.
static bool classof(const Code *code)
Definition UnwindCodeX64.hpp:287
Spare()
Definition UnwindCodeX64.hpp:278
~Spare() override=default
std::string to_string() const override
Pretty representation.
Definition UnwindCodeX64.hpp:281
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:155
#define LIEF_API
Definition visibility.h:43