[lldb][Windows] Report module paths the way the loader spelled them (#226492)
On Windows, when creating a target, the path gets canonicalized:
Consider a subst mapping from `C:\S` to `S:\`. A target created with
`S:\a.exe` becomes `C:\S\a.exe`.
The process reports `C:\S\a.exe`, lldb adds a second module for a file
it already has, and breakpoints get a stale unresolved location next to
the real one. This is why swift-ci's Windows tests, which run from a
`T:` subst drive, fail with `2 != 1`.
This patch matches what lldb-server does on Linux: report the paths the
loader used instead.
- DLL load events use `lpImageName`, or the loader's module list on
attach.
- The executable's path comes from
`PEB::ProcessParameters->ImagePathName`.
- `ObjectFilePECOFF::ParseDependentModules` no longer resolves dependent
DLL paths with `real_path`.
- `DynamicLoaderWindowsDYLD::DidAttach` loads the process's modules even
when it does not know the target's executable path.
When the paths differ only in case, the on-disk spelling is kept.
Tested on Windows x86_64 from a subst drive. The patch fixes 37 API
tests failures.
The patch adds a regression test `functionalities/module_aliased_path`
that fails without the fix.
Requires:
- https://github.com/llvm/llvm-project/pull/227373