6#include <assembler/MacroAssemblerCodeRef.h>
8#include <QtCore/qdebug.h>
10#include <qt_windows.h>
73 codeRef->executableMemory()->exceptionHandlerStart());
75 record->info.Version = 1;
76 record->info.Flags = 0;
77 record->info.SizeOfProlog = 4;
78 record->info.CountOfUnwindCodes = 2;
79 record->info.FrameRegister =
RBP;
80 record->info.FrameRegisterOffset = 0;
87 const quintptr codeStart = quintptr(codeRef->code().executableAddress());
88 const quintptr codeSize = codeRef->size();
90 record->handler.BeginAddress = DWORD(codeStart - quintptr(record));
91 record->handler.EndAddress = DWORD(codeStart + codeSize - quintptr(record));
92 record->handler.UnwindData = offsetof(ExceptionHandlerRecord, info);
94 if (!RtlAddFunctionTable(&record->handler, 1, DWORD64(record))) {
95 const unsigned int errorCode = GetLastError();
96 qWarning() <<
"Failed to install win64 unwind hook. Error code:" << errorCode;
103 codeRef->executableMemory()->exceptionHandlerStart());
104 if (!RtlDeleteFunctionTable(&record->handler)) {
105 const unsigned int errorCode = GetLastError();
106 qWarning() <<
"Failed to remove win64 unwind hook. Error code:" << errorCode;
Combined button and popup list for selecting options.
size_t exceptionHandlerSize()
void generateFunctionTable(Function *function, JSC::MacroAssemblerCodeRef *codeRef)
void destroyFunctionTable(Function *function, JSC::MacroAssemblerCodeRef *codeRef)
UnwindCode(UINT8 offset, UnwindOpcode operation, Register info)
UnwindCode UnwindCodes[2]
UINT8 FrameRegisterOffset