MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / DbgHelp

Method DbgHelp

lib/system/stacktrace.cpp:23–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21#if WASMEDGE_OS_WINDOWS
22 struct DbgHelp {
23 DbgHelp() noexcept : Process(winapi::GetCurrentProcess()) {
24 winapi::SymSetOptions(winapi::SYMOPT_DEFERRED_LOADS_);
25 winapi::SymInitializeW(Process, nullptr, true);
26 SelfBase = winapi::SymGetModuleBase64(
27 Process, reinterpret_cast<winapi::DWORD64_>(&stackTrace));
28 NtDllBase = winapi::SymGetModuleBase64(
29 Process, reinterpret_cast<winapi::DWORD64_>(
30 &winapi::RtlCaptureStackBackTrace));
31 Kernel32Base = winapi::SymGetModuleBase64(
32 Process, reinterpret_cast<winapi::DWORD64_>(&winapi::CloseHandle));
33 }
34 ~DbgHelp() noexcept { winapi::SymCleanup(Process); }
35 void refresh() noexcept { winapi::SymRefreshModuleList(Process); }
36 winapi::HANDLE_ Process;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected