MCPcopy Create free account
hub / github.com/KDAB/GammaRay / get_current_exception_context

Function get_current_exception_context

3rdparty/StackWalker/StackWalker.cpp:886–898  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

884#endif
885
886static PCONTEXT get_current_exception_context()
887{
888 PCONTEXT * pctx = NULL;
889#if defined(_MSC_VER) && _MSC_VER >= 1400 && _MSC_VER < 1900
890 LPSTR ptd = (LPSTR)_getptd();
891 if (ptd)
892 pctx = (PCONTEXT *)(ptd + (sizeof(void*) == 4 ? 0x8C : 0xF8));
893#endif
894#if defined(_MSC_VER) && _MSC_VER >= 1900
895 pctx = (PCONTEXT *)__current_exception_context();
896#endif
897 return pctx ? *pctx : NULL;
898}
899
900bool StackWalker::Init(ExceptType extype, int options, LPCSTR szSymPath, DWORD dwProcessId,
901 HANDLE hProcess, PEXCEPTION_POINTERS exp)

Callers 2

InitMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected