__in_opt PEXCEPTION_RECORD ExceptionRecord,
__in PVOID ReturnValue,
__in PT_CONTEXT ContextRecord,
- __in_opt PUNWIND_HISTORY_TABLE HistoryTable
+ __in_opt PVOID HistoryTable
);
EXTERN_C
__in DWORD HandlerType,
__in DWORD ImageBase,
__in DWORD ControlPc,
- __in PRUNTIME_FUNCTION FunctionEntry,
+ __in PT_RUNTIME_FUNCTION FunctionEntry,
__inout PT_CONTEXT ContextRecord,
__out PVOID *HandlerData,
__out PDWORD EstablisherFrame,
// each frame function.
//
-#ifndef TARGET_UNIX
-#ifdef HOST_X86
-typedef struct _RUNTIME_FUNCTION {
+#if defined(HOST_WINDOWS)
+typedef struct _T_RUNTIME_FUNCTION {
DWORD BeginAddress;
DWORD UnwindData;
-} RUNTIME_FUNCTION, *PRUNTIME_FUNCTION;
-
-//
-// Define unwind history table structure.
-//
-
-#define UNWIND_HISTORY_TABLE_SIZE 12
-
-typedef struct _UNWIND_HISTORY_TABLE_ENTRY {
- DWORD ImageBase;
- PRUNTIME_FUNCTION FunctionEntry;
-} UNWIND_HISTORY_TABLE_ENTRY, *PUNWIND_HISTORY_TABLE_ENTRY;
-
-typedef struct _UNWIND_HISTORY_TABLE {
- DWORD Count;
- BYTE LocalHint;
- BYTE GlobalHint;
- BYTE Search;
- BYTE Once;
- DWORD LowAddress;
- DWORD HighAddress;
- UNWIND_HISTORY_TABLE_ENTRY Entry[UNWIND_HISTORY_TABLE_SIZE];
-} UNWIND_HISTORY_TABLE, *PUNWIND_HISTORY_TABLE;
-#endif // HOST_X86
-#endif // !TARGET_UNIX
-
+} T_RUNTIME_FUNCTION, *PT_RUNTIME_FUNCTION;
+#else // HOST_WINDOWS
+#define T_RUNTIME_FUNCTION RUNTIME_FUNCTION
+#define PT_RUNTIME_FUNCTION PRUNTIME_FUNCTION
+#endif // HOST_WINDOWS
//
// Nonvolatile context pointer record.
//
typedef
-PRUNTIME_FUNCTION
+PT_RUNTIME_FUNCTION
(*PGET_RUNTIME_FUNCTION_CALLBACK) (
IN DWORD64 ControlPc,
IN PVOID Context
typedef struct _T_DISPATCHER_CONTEXT {
ULONG ControlPc;
ULONG ImageBase;
- PRUNTIME_FUNCTION FunctionEntry;
+ PT_RUNTIME_FUNCTION FunctionEntry;
ULONG EstablisherFrame;
ULONG TargetPc;
PT_CONTEXT ContextRecord;
PEXCEPTION_ROUTINE LanguageHandler;
PVOID HandlerData;
- PUNWIND_HISTORY_TABLE HistoryTable;
+ PVOID HistoryTable;
ULONG ScopeIndex;
BOOLEAN ControlPcIsUnwound;
PUCHAR NonVolatileRegisters;
} T_DISPATCHER_CONTEXT, *PT_DISPATCHER_CONTEXT;
-#if defined(TARGET_UNIX) || defined(HOST_X86)
-#define T_RUNTIME_FUNCTION RUNTIME_FUNCTION
-#define PT_RUNTIME_FUNCTION PRUNTIME_FUNCTION
-#else
-typedef struct _T_RUNTIME_FUNCTION {
- DWORD BeginAddress;
- DWORD UnwindData;
-} T_RUNTIME_FUNCTION, *PT_RUNTIME_FUNCTION;
-#endif
#elif defined(HOST_AMD64) && defined(TARGET_ARM64) // Host amd64 managing ARM64 related code
PCONTEXT ContextRecord;
PEXCEPTION_ROUTINE LanguageHandler;
PVOID HandlerData;
- PUNWIND_HISTORY_TABLE HistoryTable;
+ PVOID HistoryTable;
DWORD ScopeIndex;
BOOLEAN ControlPcIsUnwound;
PBYTE NonVolatileRegisters;
#define OUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK_EXPORT_NAME \
"OutOfProcessFunctionTableCallback"
-// #if !defined(TARGET_OSX)
-// typedef LONG (*PEXCEPTION_ROUTINE)(
- // IN PEXCEPTION_POINTERS pExceptionPointers,
- // IN LPVOID lpvParam);
-
-// #define DISPATCHER_CONTEXT LPVOID
-
-// #else // defined(TARGET_OSX)
-
-//
-// Define unwind history table structure.
-//
-
-#define UNWIND_HISTORY_TABLE_SIZE 12
-
-typedef struct _UNWIND_HISTORY_TABLE_ENTRY {
- DWORD64 ImageBase;
- PRUNTIME_FUNCTION FunctionEntry;
-} UNWIND_HISTORY_TABLE_ENTRY, *PUNWIND_HISTORY_TABLE_ENTRY;
-
-typedef struct _UNWIND_HISTORY_TABLE {
- DWORD Count;
- BYTE LocalHint;
- BYTE GlobalHint;
- BYTE Search;
- BYTE Once;
- DWORD64 LowAddress;
- DWORD64 HighAddress;
- UNWIND_HISTORY_TABLE_ENTRY Entry[UNWIND_HISTORY_TABLE_SIZE];
-} UNWIND_HISTORY_TABLE, *PUNWIND_HISTORY_TABLE;
-
typedef
EXCEPTION_DISPOSITION
(*PEXCEPTION_ROUTINE) (
PCONTEXT ContextRecord;
PEXCEPTION_ROUTINE LanguageHandler;
PVOID HandlerData;
- PUNWIND_HISTORY_TABLE HistoryTable;
+ PVOID HistoryTable;
DWORD ScopeIndex;
BOOLEAN ControlPcIsUnwound;
PBYTE NonVolatileRegisters;
PCONTEXT ContextRecord;
PEXCEPTION_ROUTINE LanguageHandler;
PVOID HandlerData;
- PUNWIND_HISTORY_TABLE HistoryTable;
+ PVOID HistoryTable;
ULONG64 ScopeIndex;
BOOLEAN ControlPcIsUnwound;
PBYTE NonVolatileRegisters;
PCONTEXT ContextRecord;
PEXCEPTION_ROUTINE LanguageHandler;
PVOID HandlerData;
- PUNWIND_HISTORY_TABLE HistoryTable;
+ PVOID HistoryTable;
} DISPATCHER_CONTEXT, *PDISPATCHER_CONTEXT;
#elif defined(HOST_X86)
PCONTEXT ContextRecord;
PEXCEPTION_ROUTINE LanguageHandler;
PVOID HandlerData;
- PUNWIND_HISTORY_TABLE HistoryTable;
+ PVOID HistoryTable;
BOOLEAN ControlPcIsUnwound;
} DISPATCHER_CONTEXT, *PDISPATCHER_CONTEXT;