MCPcopy Create free account
hub / github.com/FastLED/FastLED / get_module_name

Method get_module_name

tests/crash_handler_win.h:116–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114 // --- Symbol helpers ---
115
116 std::string get_module_name(DWORD64 address) {
117 HMODULE hModule;
118 if (GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS |
119 GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
120 (LPCTSTR)address, &hModule)) {
121 char moduleName[MAX_PATH];
122 if (GetModuleFileNameA(hModule, moduleName, MAX_PATH)) {
123 char* fileName = strrchr(moduleName, '\\');
124 if (fileName) fileName++;
125 else fileName = moduleName;
126 return std::string(fileName);
127 }
128 }
129 return "unknown";
130 }
131
132 std::string demangle_symbol(const char* symbol_name) {
133 if (!symbol_name) return "unknown";

Callers

nothing calls this directly

Calls 2

strrchrFunction · 0.85
stringClass · 0.50

Tested by

no test coverage detected