3#ifndef SYMS_UNWIND_PE_X64_C
4#define SYMS_UNWIND_PE_X64_C
33 missed_read_addr = sp;
129 missed_read_addr = sp;
174 regs->
rsp.
u64 = frame_base;
184 missed_read_addr = addr;
200 missed_read_addr = addr;
231 missed_read_addr = addr;
247 missed_read_addr = addr;
276 missed_read_addr =
sp_adj;
331 missed_read_addr = sp;
349 if (missed_read_addr != 0){
350 SYMS_Log(
"Memory read miss: 0x%llx\n", missed_read_addr);
409 missed_read_addr = sp;
474 if ((
modrm >> 6) == 1){
498 missed_read_addr = sp;
523 missed_read_addr = sp;
555 if (missed_read_addr != 0){
556 SYMS_Log(
"Memory read miss: 0x%llx\n", missed_read_addr);
616 if ((
inst[0] & 0xF8) == 0x48){
621 if (
inst[0] == 0x48 &&
inst[2] == 0xC4){
632 if (
inst[0] == 0x48 &&
inst[2] == 0xC4){
643 if ((
inst[0] & 0x06) == 0 &&
644 ((
inst[2] >> 3) & 0x07) == 0x04 &&
645 (
inst[2] & 0x07) != 0x04){
689 case 0x58:
case 0x59:
case 0x5A:
case 0x5B:
690 case 0x5C:
case 0x5D:
case 0x5E:
case 0x5F:
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition syms_base.h:410
Definition syms_pe_parser.h:15
SYMS_U64 section_array_off
Definition syms_pe_parser.h:22
SYMS_U32 voff_unwind_info
Definition syms_pe.h:65
Definition syms_meta_regs_x64.h:6
SYMS_Reg64 r13
Definition syms_meta_regs_x64.h:20
SYMS_Reg256 ymm0
Definition syms_meta_regs_x64.h:67
SYMS_Reg16 ss
Definition syms_meta_regs_x64.h:61
SYMS_Reg64 r8
Definition syms_meta_regs_x64.h:15
SYMS_Reg64 rsi
Definition syms_meta_regs_x64.h:13
SYMS_Reg64 rcx
Definition syms_meta_regs_x64.h:8
SYMS_Reg64 rbp
Definition syms_meta_regs_x64.h:12
SYMS_Reg64 rsp
Definition syms_meta_regs_x64.h:11
SYMS_Reg64 rip
Definition syms_meta_regs_x64.h:25
SYMS_Reg64 rdx
Definition syms_meta_regs_x64.h:9
SYMS_Reg64 rdi
Definition syms_meta_regs_x64.h:14
SYMS_Reg64 rflags
Definition syms_meta_regs_x64.h:26
SYMS_Reg64 r12
Definition syms_meta_regs_x64.h:19
SYMS_Reg64 rbx
Definition syms_meta_regs_x64.h:10
SYMS_Reg64 r9
Definition syms_meta_regs_x64.h:16
SYMS_Reg64 r15
Definition syms_meta_regs_x64.h:22
SYMS_Reg64 r11
Definition syms_meta_regs_x64.h:18
SYMS_Reg64 rax
Definition syms_meta_regs_x64.h:7
SYMS_Reg64 r14
Definition syms_meta_regs_x64.h:21
SYMS_Reg64 r10
Definition syms_meta_regs_x64.h:17
Definition syms_base.h:296
SYMS_U8 * str
Definition syms_base.h:297
Definition syms_base.h:264
Definition syms_unwind_pe_x64.h:49
Definition syms_base.h:420
SYMS_U64 stack_pointer
Definition syms_base.h:424
SYMS_B32 dead
Definition syms_base.h:421
SYMS_API SYMS_U64 syms_based_range_read(void *base, SYMS_U64Range range, SYMS_U64 offset, SYMS_U64 out_size, void *out)
Definition syms_base.c:753
SYMS_API SYMS_B32 syms_memory_view_read(SYMS_MemoryView *memview, SYMS_U64 addr, SYMS_U64 size, void *ptr)
Definition syms_base.c:849
SYMS_API void syms_unwind_result_missed_read(SYMS_UnwindResult *unwind_result, SYMS_U64 addr)
Definition syms_base.c:861
#define syms_true
Definition syms_base.h:105
#define syms_based_range_read_struct(b, r, o, p)
Definition syms_base.h:593
#define syms_memory_view_read_struct(s, a, p)
Definition syms_base.h:602
#define SYMS_AlignPow2(a, b)
Definition syms_base.h:187
#define SYMS_LOCAL
Definition syms_base.h:43
#define syms_false
Definition syms_base.h:104
#define SYMS_API
Definition syms_base.h:29
#define SYMS_ASSERT(x)
Definition syms_base.h:125
SYMS_S32 SYMS_B32
Definition syms_base.h:99
int32_t SYMS_S32
Definition syms_crt_overrides.h:34
uint32_t SYMS_U32
Definition syms_crt_overrides.h:38
uint64_t SYMS_U64
Definition syms_crt_overrides.h:39
#define syms_memmove
Definition syms_crt_overrides.h:65
#define SYMS_U64
Definition syms_crt_overrides.h:54
#define SYMS_U32
Definition syms_crt_overrides.h:53
uint16_t SYMS_U16
Definition syms_crt_overrides.h:37
uint8_t SYMS_U8
Definition syms_crt_overrides.h:36
int8_t SYMS_S8
Definition syms_crt_overrides.h:32
#define SYMS_LogClose(block)
Definition syms_dev.h:142
#define SYMS_LogOpen(ftr, uid, block)
Definition syms_dev.h:141
@ SYMS_LogFeature_PEEpilog
Definition syms_dev.h:27
#define SYMS_Log(fmt,...)
Definition syms_dev.h:143
SYMS_API void * syms_pe_ptr_from_voff(SYMS_String8 data, SYMS_PeBinAccel *bin, SYMS_U64 voff)
Definition syms_pe_parser.c:533
SYMS_API SYMS_U64 syms_pe_binary_search_intel_pdata(SYMS_String8 data, SYMS_PeBinAccel *bin, SYMS_U64 voff)
Definition syms_pe_parser.c:440
SYMS_API SYMS_U64 syms_pe_sec_number_from_voff(SYMS_String8 data, SYMS_PeBinAccel *bin, SYMS_U64 voff)
Definition syms_pe_parser.c:495
SYMS_API void * syms_pe_ptr_from_sec_number(SYMS_String8 data, SYMS_PeBinAccel *bin, SYMS_U64 n)
Definition syms_pe_parser.c:510
SYMS_API SYMS_CoffSectionHeader * syms_pecoff_sec_hdr_from_n(SYMS_String8 data, SYMS_U64 sec_hrds_off, SYMS_U64 n)
Definition syms_pecoff_helpers.c:7
SYMS_API SYMS_Reg64 * syms_unwind_pe_x64__gpr_reg(SYMS_RegX64 *regs, SYMS_UnwindPeX64GprReg reg_id)
Definition syms_unwind_pe_x64.c:742
SYMS_API SYMS_B32 syms_unwind_pe_x64__voff_is_in_epilog(SYMS_String8 bin_data, SYMS_PeBinAccel *bin, SYMS_U64 voff, SYMS_PeIntelPdata *final_pdata)
Definition syms_unwind_pe_x64.c:589
SYMS_API SYMS_U32 syms_unwind_pe_x64__slot_count_from_op_code(SYMS_UnwindPeOpCode op_code)
Definition syms_unwind_pe_x64.c:570
SYMS_API SYMS_UnwindResult syms_unwind_pe_x64(SYMS_String8 data, SYMS_PeBinAccel *bin, SYMS_U64 bin_base, SYMS_MemoryView *memview, SYMS_RegX64 *regs)
Definition syms_unwind_pe_x64.c:10
SYMS_API SYMS_UnwindResult syms_unwind_pe_x64__epilog(SYMS_String8 bin_data, SYMS_PeBinAccel *bin, SYMS_U64 bin_base, SYMS_MemoryView *memview, SYMS_RegX64 *regs)
Definition syms_unwind_pe_x64.c:362
@ SYMS_UnwindPeInfoFlag_CHAINED
Definition syms_unwind_pe_x64.h:41
#define SYMS_UnwindPeInfo_FlagsFromHeader(x)
Definition syms_unwind_pe_x64.h:45
#define SYMS_UnwindPeInfo_RegFromFrame(x)
Definition syms_unwind_pe_x64.h:46
#define SYMS_UnwindPeCode_InfoFromFlags(x)
Definition syms_unwind_pe_x64.h:26
#define SYMS_UnwindPeInfo_OffFromFrame(x)
Definition syms_unwind_pe_x64.h:47
#define SYMS_UnwindPeCode_CodeFromFlags(x)
Definition syms_unwind_pe_x64.h:25
SYMS_U32 SYMS_UnwindPeOpCode
Definition syms_unwind_pe_x64.h:10
SYMS_U8 SYMS_UnwindPeX64GprReg
Definition syms_unwind_pe_x64.h:59
@ SYMS_UnwindPeX64GprReg_RSI
Definition syms_unwind_pe_x64.h:67
@ SYMS_UnwindPeX64GprReg_R14
Definition syms_unwind_pe_x64.h:75
@ SYMS_UnwindPeX64GprReg_R12
Definition syms_unwind_pe_x64.h:73
@ SYMS_UnwindPeX64GprReg_RBP
Definition syms_unwind_pe_x64.h:66
@ SYMS_UnwindPeX64GprReg_R8
Definition syms_unwind_pe_x64.h:69
@ SYMS_UnwindPeX64GprReg_RCX
Definition syms_unwind_pe_x64.h:62
@ SYMS_UnwindPeX64GprReg_R9
Definition syms_unwind_pe_x64.h:70
@ SYMS_UnwindPeX64GprReg_R13
Definition syms_unwind_pe_x64.h:74
@ SYMS_UnwindPeX64GprReg_RDX
Definition syms_unwind_pe_x64.h:63
@ SYMS_UnwindPeX64GprReg_RAX
Definition syms_unwind_pe_x64.h:61
@ SYMS_UnwindPeX64GprReg_RBX
Definition syms_unwind_pe_x64.h:64
@ SYMS_UnwindPeX64GprReg_RDI
Definition syms_unwind_pe_x64.h:68
@ SYMS_UnwindPeX64GprReg_RSP
Definition syms_unwind_pe_x64.h:65
@ SYMS_UnwindPeX64GprReg_R10
Definition syms_unwind_pe_x64.h:71
@ SYMS_UnwindPeX64GprReg_R15
Definition syms_unwind_pe_x64.h:76
@ SYMS_UnwindPeX64GprReg_R11
Definition syms_unwind_pe_x64.h:72
@ SYMS_UnwindPeOpCode_SAVE_XMM128_FAR
Definition syms_unwind_pe_x64.h:21
@ SYMS_UnwindPeOpCode_EPILOG
Definition syms_unwind_pe_x64.h:18
@ SYMS_UnwindPeOpCode_ALLOC_LARGE
Definition syms_unwind_pe_x64.h:13
@ SYMS_UnwindPeOpCode_SET_FPREG
Definition syms_unwind_pe_x64.h:15
@ SYMS_UnwindPeOpCode_PUSH_MACHFRAME
Definition syms_unwind_pe_x64.h:22
@ SYMS_UnwindPeOpCode_SAVE_XMM128
Definition syms_unwind_pe_x64.h:20
@ SYMS_UnwindPeOpCode_PUSH_NONVOL
Definition syms_unwind_pe_x64.h:12
@ SYMS_UnwindPeOpCode_ALLOC_SMALL
Definition syms_unwind_pe_x64.h:14
@ SYMS_UnwindPeOpCode_SAVE_NONVOL_FAR
Definition syms_unwind_pe_x64.h:17
@ SYMS_UnwindPeOpCode_SPARE_CODE
Definition syms_unwind_pe_x64.h:19
@ SYMS_UnwindPeOpCode_SAVE_NONVOL
Definition syms_unwind_pe_x64.h:16
SYMS_U16 u16
Definition syms_regs.h:11
Definition syms_regs.h:20
SYMS_U64 u64
Definition syms_regs.h:22
Definition syms_unwind_pe_x64.h:28