| 138 | } |
| 139 | |
| 140 | std::string Watchdog::GetDllPath(uint64_t addr) { |
| 141 | std::string dllName = "UNKNOWN"; |
| 142 | |
| 143 | auto it = m_loadedDLLs.upper_bound(addr); |
| 144 | if (it == m_loadedDLLs.begin()) { |
| 145 | dllName = "UNKNOWN"; |
| 146 | } else { |
| 147 | --it; |
| 148 | dllName = it->second; |
| 149 | } |
| 150 | |
| 151 | return std::filesystem::path(dllName).filename().string(); |
| 152 | } |
| 153 | |
| 154 | void Watchdog::ShowCallstack(HANDLE proc, HANDLE thread) { |
| 155 | CONTEXT ctx{}; |