https://bugs.winehq.org/show_bug.cgi?id=57308
--- Comment #4 from yan12125 pq2sx44teeigl7za@chyen.cc --- Thank you for the details. I did use objcopy to generate foo.dll.debug files. However, I didn't find a way for this part:
These .debug files could be installed (as ELF ones) according to .build-id hierarchy in /usr/lib/debug.
Specifically, I didn't find a command to parse the build ID for PE files, so I put debug files to /usr/lib/debug/usr/lib/wine/x86_64-windows/foo.dll.debug. It seems wine attempts paths with that pattern, but not doing it correctly.