MCPcopy Create free account
hub / github.com/WinMerge/winmerge / Init

Method Init

Externals/StackWalker/Main/StackWalker/StackWalker.cpp:954–976  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

952}
953
954bool StackWalker::Init(ExceptType extype, int options, LPCSTR szSymPath, DWORD dwProcessId,
955 HANDLE hProcess, PEXCEPTION_POINTERS exp)
956{
957 PCONTEXT ctx = NULL;
958 if (extype == AfterCatch)
959 ctx = get_current_exception_context();
960 if (extype == AfterExcept && exp)
961 ctx = exp->ContextRecord;
962 this->m_options = options;
963 this->m_modulesLoaded = FALSE;
964 this->m_szSymPath = NULL;
965 this->m_MaxRecursionCount = 1000;
966 this->m_sw = NULL;
967 SetTargetProcess(dwProcessId, hProcess);
968 SetSymPath(szSymPath);
969 /* MSVC ignore std::nothrow specifier for `new` operator */
970 LPVOID buf = malloc(sizeof(StackWalkerInternal));
971 if (!buf)
972 return false;
973 memset(buf, 0, sizeof(StackWalkerInternal));
974 this->m_sw = new(buf) StackWalkerInternal(this, this->m_hProcess, ctx); // placement new
975 return true;
976}
977
978StackWalker::StackWalker(DWORD dwProcessId, HANDLE hProcess)
979{

Callers 1

LoadModulesMethod · 0.45

Calls 1

Tested by

no test coverage detected