Help debugging wine with CAM app

Kyle kyle at
Wed May 8 13:52:45 CDT 2002

I'd like to get involved in wine development.  I'm starting by trying to 
get wine to run my favorite CAM application.  Anyone who could give me a 
little coaching on debugging would be much appreciated.

I'm using a recent CVS download of wine.  To replicate the problem, do:

Download the zip file at
Unzip it under /c/Program Files. Then CD into MTC/TurboNest/Program
and run:

winedbg TurboNst.exe --debugmsg trace+string,+relay 2>/tmp/debug.out

Search in the debug file for the string: TURBONST.ent
Right around there is about where it starts to go into an endless loop.

I have been single stepping all around in there and I can't figure out 
what is going on.

One wierd thing: In the debugger, do
break INT_Int31Handler
then single step into CallRMInt
on line: if (!Dosvm.CallRMInt && !DPMI_LoadDosSystem()),
it doesn't seem to call DPMI_LoadDosSystem() at the correct address
it calls some other address which looks like a jump table of some

I'm not sure if that's the problem, but in any case, there's a point
soon thereafter where it gets stuck doing:

trace:string:lstrcmpiA strcmpi "" and "TURBONST.ent"

over and over again.

One other interesting thing: I found out by accident that if I patch
into wine an illegal operation as follows:

Put into the last line of procedure:
BOOL WINAPI SetCurrentDirectoryA( LPCSTR dir )

a command that access memory illegally such as:
FIXME("TRUE:%s\n",drive); //drive is an int--not a string

Then run the program. Wine reports the illegal memory access, but
then goes on to run the program successfully (other than that the
fonts look funny and that function doesn't work right).

Anyone that has experience debugging wine, I'm interested in learning
more about how to do it. If I can get some experience under my belt,
I'd love to help developing wine and finding more bugs.

Thanks in advance!

Kyle Bateman

More information about the wine-devel mailing list