| 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; |
nothing calls this directly
no outgoing calls
no test coverage detected