Re: debugging an app

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Henry Gomersall wrote:
I'm trying to debug a program that page faults on me, and I'm actually
quite keen to have a go at fixing it myself.

Unfortunately, I seem to have fallen at the first hurdle: I can't make
good use of the debug messages.

Background:
The program I am attempting to run is TrackLogs
( http://www.tracklogs.co.uk ). Installation went fine and on first run
I got the licence key dialogue, which I filled and it was after that It
crashed. On restart, it prompts me to accept that I have so many days
left on the licence, and then it crashes as I continue. Attached are the
various dubugging dumps (so I get a single dialogue screen before the
crash).

Debugging:
If I set the windows version (within winecfg) to XP or 2000, I end up
getting the same calls repeated as long as I can be bothered to wait.
Running "WINEDEBUG=+relay wine TrackLogsV3.exe"...

You mean you are letting the messages print to your terminal? That will likely slow things down too much to be useful. Better to redirect to a file:
WINEDEBUG=+relay wine TrackLogsV3.exe &> wine.log
That will still be slower than without debugging, but should be fast enough to be useful. The file can sometimes be vary large (>1GB) though since it apparently is failing early, probably it will not be so big.

After the log is written to a file, I generally find it easier to chop into pieces:
split --bytes=20m wine.log
That will create files named xaa, xab ...

If you are going through the relay traces, there is a tool in the wine tree that makes them easier to read (at least for me):
wine/tools/examine-relay xaa -f > xaa2
Now the file xaa2 will have the relay traces nicely indented.

I get the following
calls repeated:
0009:Call KERNEL32.TlsGetValue(00000001) ret=7c34964c
0009:Ret  KERNEL32.TlsGetValue() retval=00db00f8 ret=7c34964c
0009:Call KERNEL32.SetLastError(0000007a) ret=7c3496a2
0009:Ret  KERNEL32.SetLastError() retval=0000007a ret=7c3496a2
0009:Call KERNEL32.GetLastError() ret=7c34963e
0009:Ret  KERNEL32.GetLastError() retval=0000007a ret=7c34963e

In your ~/.wine/user.reg, there is a registry key:
[Software\\Wine\\Debug] 1147111116
"RelayExclude"="ntdll.RtlEnterCriticalSection;ntdll.RtlLeaveCriticalSection;kernel32.97;kernel32.98"

Try adding kernel32.TlsGetValue etc to it.

If I set the windows version to 98, I get as the final few lines:

Does the program run under Win98? In any case, I wouldn't bother trying to run it that way.


_______________________________________________
wine-users mailing list
wine-users@xxxxxxxxxx
http://www.winehq.org/mailman/listinfo/wine-users

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux