On Mon Apr 24 16:42:25 2023 +0000, Jacek Caban wrote:
Did you consider using GDB JIT interface? I wonder if we could use it to register PE files: https://sourceware.org/gdb/onlinedocs/gdb/JIT-Interface.html
I haven't, but the problem is also that because wine preloader is a static executable, gdb bails out and doesn't hook any unix code either.
Maybe we could use JIT to register the PE files, but we'd still need to hook into dlopen to intercept and expose unix libraries. And at this point it's just easier to expose the loader entry points gdb expects to find, and it is then very happy to load any PE file it finds in the link map.