[Lldb-commits] [lldb] [lldb][Windows] Report module paths the way the loader spelled them (PR #226492)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Sep 29 06:07:31 PDT 2026
================
@@ -408,7 +410,15 @@ static bool GetLoadedModulePath(HANDLE process, HMODULE module,
canonical.replace(0, wcslen(kUNCPrefix), L"\\\\");
else if (canonical.rfind(kDOSPrefix, 0) == 0)
canonical.erase(0, wcslen(kDOSPrefix));
- wpath = std::move(canonical);
+ std::wstring loader_path = wpath;
+ if (loader_path.rfind(kUNCPrefix, 0) == 0)
+ loader_path.replace(0, wcslen(kUNCPrefix), L"\\\\");
+ else if (loader_path.rfind(kDOSPrefix, 0) == 0)
+ loader_path.erase(0, wcslen(kDOSPrefix));
+ if (::_wcsicmp(canonical.c_str(), loader_path.c_str()) == 0)
+ wpath = std::move(canonical);
+ else
+ wpath = std::move(loader_path);
----------------
Nerixyz wrote:
In both cases, we're using the path the loader gave us. The only possible difference is casing. Do we still need to call `GetFinalPathNameByHandleW`?
https://github.com/llvm/llvm-project/pull/226492
More information about the lldb-commits
mailing list