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

Method Init

3rdparty/StackWalker/StackWalker.cpp:900–922  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

898}
899
900bool StackWalker::Init(ExceptType extype, int options, LPCSTR szSymPath, DWORD dwProcessId,
901 HANDLE hProcess, PEXCEPTION_POINTERS exp)
902{
903 PCONTEXT ctx = NULL;
904 if (extype == AfterCatch)
905 ctx = get_current_exception_context();
906 if (extype == AfterExcept && exp)
907 ctx = exp->ContextRecord;
908 this->m_options = options;
909 this->m_modulesLoaded = FALSE;
910 this->m_szSymPath = NULL;
911 this->m_MaxRecursionCount = 1000;
912 this->m_sw = NULL;
913 SetTargetProcess(dwProcessId, hProcess);
914 SetSymPath(szSymPath);
915 /* MSVC ignore std::nothrow specifier for `new` operator */
916 LPVOID buf = malloc(sizeof(StackWalkerInternal));
917 if (!buf)
918 return false;
919 memset(buf, 0, sizeof(StackWalkerInternal));
920 this->m_sw = new(buf) StackWalkerInternal(this, this->m_hProcess, ctx); // placement new
921 return true;
922}
923
924StackWalker::StackWalker(DWORD dwProcessId, HANDLE hProcess)
925{

Callers 1

LoadModulesMethod · 0.45

Calls 1

Tested by

no test coverage detected