As we all know, gdb isn't very compatible with wine, since gdb makes so many assumptions about the operating environment that isn't true in wine. But lately it occurred to me that perhaps it's possible to use gdb's remote debugging features to solve these issues. So recently, I've been secretly experimenting with writing gdb-server code in the wineserver. It goes something like this...
./configure --enable-remote-gdb [...blah...]
$ wine stuff gdb socket ready at: target remote localhost:1234
$ gdb wine (gdb) target remote localhost:1234
and you're currently able to look at registers, backtrace, list all the threads, change thread, and read process memory... neato. But its usefulness might be quite limited since gdb doesn't know about the dynamically-loaded dlls so it doesn't automatically load their symbols... does anyone have ideas on how to solve that? It doesn't appear that the standard remote protocol have a command to tell gdb, and I don't know how gdb ordinarily does it.
I've pondered making wine generate a file full of "add-symbol-file" commands or something that could be executed by gdb, but I don't know how to do that cleanly... preferably hacks for loading symbols should be transparent to the developer, and new symbols loaded automatically after new dlls are loaded. Hmm...