Debugging Win32 apps on linux
Hi, Using Mingw64, I can build a c/c++ Win32 application, but can I debug it? using winedbg application.exe does seem to work, but is there a way of doing it like I would debug a linux application? I can build a c/c++ application with gcc, and then debug it by using ddd application And that works really well. Is there a way to get ddd (or some other program) to act as winedbg's frontend? Even if it's text-mode, that's fine, as long as it's easier to use than gdb Thanks
A) did you try running gdb.exe (the PE port of gdb from MingW) ? B) it's been a long time I didn't try with ddd, but winedbg can act as a gdb remote proxy server winedbg --port NN --no-start app.exe [args...] will start winedbg as a remote proxy waiting for the debugger front end to connect to it ddd (or more likely the underlying gdb) has the ability to connect to the remote gdb proxy (gdb command is 'target remote localhost NN' --where NN is the port number you've used to start with) C) there are also some gdb forks to better support Wine Note that A and B will mostly support the PE side of things; while C can also support the Unix side of Wine
Just tried running winedbg with ddd and it seems to be working. I'm attaching a bash script I used to launch it. On Fri, Mar 27, 2026 at 3:26 PM eric.pouech--- via Wine-Devel < wine-devel@list.winehq.org> wrote:
A) did you try running gdb.exe (the PE port of gdb from MingW) ?
B) it's been a long time I didn't try with ddd, but winedbg can act as a gdb remote proxy server winedbg --port NN --no-start app.exe [args...]
will start winedbg as a remote proxy waiting for the debugger front end to connect to it ddd (or more likely the underlying gdb) has the ability to connect to the remote gdb proxy (gdb command is 'target remote localhost NN' --where NN is the port number you've used to start with)
C) there are also some gdb forks to better support Wine
Note that A and B will mostly support the PE side of things; while C can also support the Unix side of Wine
Many thanks to both of you for this: I copied the script into a folder mentioned in my PATH variable, and invoked a Win32 executable I built with the -g compiler option, and it worked! I'll spend some time wondering how you did that, Anton :-) Hoping this also helps anyone else trying to switch their development over to Linux from Windows. Thanks again, J On Fri., Mar. 27, 2026, 6:22 a.m. Anton Baskanov via Wine-Devel, < wine-devel@list.winehq.org> wrote:
Just tried running winedbg with ddd and it seems to be working. I'm attaching a bash script I used to launch it.
On Fri, Mar 27, 2026 at 3:26 PM eric.pouech--- via Wine-Devel < wine-devel@list.winehq.org> wrote:
A) did you try running gdb.exe (the PE port of gdb from MingW) ?
B) it's been a long time I didn't try with ddd, but winedbg can act as a gdb remote proxy server winedbg --port NN --no-start app.exe [args...]
will start winedbg as a remote proxy waiting for the debugger front end to connect to it ddd (or more likely the underlying gdb) has the ability to connect to the remote gdb proxy (gdb command is 'target remote localhost NN' --where NN is the port number you've used to start with)
C) there are also some gdb forks to better support Wine
Note that A and B will mostly support the PE side of things; while C can also support the Unix side of Wine
participants (3)
-
Anton Baskanov -
eric.pouech@orange.fr -
J