Fabian Maurer (@DarkShadow44) commented about dlls/ntdll/unix/virtual.c:
#ifdef VALGRIND_LOAD_PDB_DEBUGINFO VALGRIND_LOAD_PDB_DEBUGINFO(fd, ptr, total_size, ptr - (char *)wine_server_get_ptr( image_info->base )); #endif
- if (wine_gdb_dll_loaded) notify_gdb_dll_loaded( ptr, filename, ptr - (char *)wine_server_get_ptr( image_info->base ) );
I found an issue here while trying to debug msvbvm50.exe from winetricks (vb5run).
The exe unpacks its own ADVPACK.DLL in its current working directory. Due to the loading order, wine still loads its builtin advpack.dll. But it still sets the module filename to `Z:/home/fabian/.wine/drive_c/users/fabian/Temp/IXP010.TMP/ADVPACK.DLL` According to Alexandre this is intentional, since programs should not know the DLL was substituted for a builtin one. However, this leads to gdb loading the symbols for the wrong DLL, making debugging advpack impossible. I guess we need to get the unix path and convert it to nt before we pass it to GDB, unless you have a better idea?
Also see [MR 4873](https://gitlab.winehq.org/wine/wine/-/merge_requests/4573) and [bug 56211](https://bugs.winehq.org/show_bug.cgi?id=56211)