-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathehhelpers.h
87 lines (66 loc) · 2.09 KB
/
ehhelpers.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
//
// Copyright (c) Microsoft Corporation. All Rights reserved.
//
#pragma once
#if defined(_M_X64) || defined(_M_ARM_NT) || defined(_M_ARM64) || defined(_CHPE_X86_ARM64_EH_)
#define _pForeignExcept (*((EHExceptionRecord **)&(__vcrt_getptd()->_pForeignException)))
#endif
#define pFrameInfoChain (*((FRAMEINFO **) &(__vcrt_getptd()->_pFrameInfoChain)))
// Pre-V4 managed exception code
#define MANAGED_EXCEPTION_CODE 0XE0434F4D
// V4 and later managed exception code
#define MANAGED_EXCEPTION_CODE_V4 0XE0434352
extern "C" void
__except_validate_context_record(
_In_ PCONTEXT ContextRecord
);
extern "C" _VCRTIMP void * __AdjustPointer(
void *,
const PMD&
);
extern "C" _VCRTIMP void * __GetPlatformExceptionInfo(
int *
);
extern "C" _VCRTIMP int __cdecl __FrameUnwindFilter(
EXCEPTION_POINTERS *
);
extern PGETWINRT_OOM_EXCEPTION __WinRTOutOfMemoryExceptionCallback;
extern "C" _VCRTIMP void __cdecl __DestructExceptionObject(
EHExceptionRecord *,
BOOLEAN
);
extern "C" _VCRTIMP void __cdecl RENAME_EH_EXTERN(__BuildCatchObject)(
EHExceptionRecord *,
void *,
HandlerType *,
CatchableType *
);
extern "C" _VCRTIMP int __cdecl RENAME_EH_EXTERN(__TypeMatch4)(
HandlerType4 *,
CatchableType *,
ThrowInfo *
);
extern "C" _VCRTIMP int __cdecl RENAME_EH_EXTERN(__TypeMatch)(
HandlerType *,
CatchableType *,
ThrowInfo *
);
//
// Prototype for the internal handler
//
template<class T>
EXCEPTION_DISPOSITION __InternalCxxFrameHandler(
EHExceptionRecord *pExcept,
EHRegistrationNode *pRN,
CONTEXT *pContext,
DispatcherContext *pDC,
typename T::FuncInfo *pFuncInfo,
int CatchDepth,
EHRegistrationNode *pMarkerRN,
BOOLEAN recursive);
#if _EH_RELATIVE_TYPEINFO
#undef THROW_COUNT
#define THROW_COUNT(ti) THROW_COUNT_IB(ti, _GetThrowImageBase())
#undef THROW_CTLIST
#define THROW_CTLIST(ti) THROW_CTLIST_IB(ti, _GetThrowImageBase())
#endif // _EH_RELATIVE_TYPEINFO