Debugging 64-bit Wine Apps with winedbg

GOUJON Alexandre ale.goujon at
Thu Sep 23 10:54:10 CDT 2010


I'm not a winedbg expert but I think your mis-using it.

As it's your software, you can compile it from source and add debug info.
I know Visual Studio can create .pdb files but I don't know if winedbg 
can use it.

Personally, I'm using gcc mingw with -g and that perfectly works.
The easiest way is to install the linux package (e.g. mingw-w64 for the 
64 bits version or mingw32 what I'm using)

Then compile your software : (depends on your arch and the 32/64 bits 
$ i586-mingw32msvc-gcc test.c -g -o test.exe

and run it through the debugger :
$ /home/alex/Projects/wine-git/wine 
/home/alex/Projects/wine-git/programs/winedbg/ test.exe

type "break main" or "break WinMain" on the console then return (you may 
have to select the proper main() )
(or break aFunctionName)
"cont" to continue until your breakpoint is reached
"list" to see the next lines of the code
"step" to step in
"next" to step over
"bt" to have the backtrace
"quit" to detach the process from the debugger and exit

you can also type "break" followed by a line number to add a breakpoint 
on the specified line of the current debugged source file

If you need more commands, G**gle is your friend.

I hope that that will help you.

If you have a page fault on create_alpha_bitmap, just type "set $BreakOnFirstChance=0" first

More information about the wine-devel mailing list