So Sitting on the airplane I was thinking of additional clarifications on debugging. Again these are just some ideas...
So lets look at an exception:
What I am talking about when more descriptive is this :
Since we know from other parts where the read is done.. why not dump the line of code?
Unhandled exception: page fault on read access to 0x00000008 in 32-bit code (0x602ec680).
so why not put as well the following:
Failure Point : /home/cahrendt/wine-git/dlls/ddraw/tests/dsurface.c:1404] 1404 IDirectDrawSurface_Release(surface3);
Code Segment... is this in WINE SPACE or Windows Application Space:
Register dump: CS:0073 SS:007b DS:007b ES:007b FS:0033 GS:003b EIP:602ec680 ESP:0033f1d0 EBP:0033f2b8 EFLAGS:00010202( - 00 - -RI1) EAX:6030b1bc EBX:6030b1b8 ECX:6ab142cc EDX:00000000 ESI:8876000a EDI:60305e8e
Put out the ASCII value as well to the right. If we can see if this is a wine Structure in here.. why not dump that or be able to highlight that fact and say this is a FOO.. here is what it contains. Also this looks like a partial stack dump.. if These are pointers to addresses or structures then why not dump those as well. Not all the time will people be able to debug at the point of failure, timing issues and the like. At a minimum if we know a certain address is a certain wine structure then note it in the stack dump if we could.
Stack dump: 0x0033f1d0: 6030b1bc 603074e8 8876000a 00000000 0x0033f1e0: 00000064 00000064 000000a0 000000a0 0x0033f1f0: 00000000 00000000 00000000 00000000 0x0033f200: 60305e8e 0033f22c 60302736 0033f2a8 0x0033f210: 0033f2a4 0033f2a0 0033f29c 603076c0 0x0033f220: 6030734c 0033f298 00030028 0000006c
See Below for a thought on this :
Backtrace: =>1 0x602ec680 AttachmentTest+0xfa0() [/home/cahrendt/wine-git/dlls/ddraw/tests/dsurface.c:1404] in ddraw_test (0x0033f2b8) 2 0x602f1735 func_dsurface+0x2175() [/home/cahrendt/wine-git/dlls/ddraw/tests/dsurface.c:2764] in ddraw_test (0x0033fde8) 3 0x60301bd8 run_test+0x128(name="dsurface.c") [/home/cahrendt/wine-git/dlls/ddraw/tests/../../../include/wine/test.h:454] in ddraw_test (0x0033fe28) 4 0x60302442 main+0x122(argc=<register ECX not in topmost frame>, argv=<register ECX not in topmost frame>) [/home/cahrendt/wine-git/dlls/ddraw/tests/../../../include/wine/test.h:503] in ddraw_test (0x0033fed8) 5 0x603025bb __wine_spec_exe_entry+0x5b(peb=0x7ffdf000) [/home/cahrendt/wine-git/dlls/winecrt0/exe_entry.c:36] in ddraw_test (0x0033ff08) 6 0x7b874207 start_process+0xc7(arg=(nil)) [/home/cahrendt/wine-git/dlls/kernel32/process.c:904] in kernel32 (0x0033ffe8) 0x602ec680 AttachmentTest+0xfa0 [/home/cahrendt/wine-git/dlls/ddraw/tests/dsurface.c:1404] in ddraw_test: call *0x8(%edx) 1404 IDirectDrawSurface_Release(surface3);
This would be a little clearer: Application Backtrace: => 1 0x602ec680 AttachmentTest+0xfa0() 2 0x602f1735 func_dsurface+0x2175() 3 0x60301bd8 run_test+0x128(name="dsurface.c") 4 0x60302442 main+0x122(argc=<register ECX not in topmost frame>, argv=<register ECX not in topmost frame>) 5 0x603025bb __wine_spec_exe_entry+0x5b(peb=0x7ffdf000) 6 0x7b874207 start_process+0xc7(arg=(nil))
Failure Point : /home/cahrendt/wine-git/dlls/ddraw/tests/dsurface.c:1404] 1404 IDirectDrawSurface_Release(surface3);
[/home/cahrendt/wine-git/dlls/ddraw/tests/dsurface.c:1404] in ddraw_test (0x0033f2b8) [/home/cahrendt/wine-git/dlls/ddraw/tests/dsurface.c:2764] in ddraw_test (0x0033fde8) [/home/cahrendt/wine-git/dlls/ddraw/tests/../../../include/wine/test.h:454] in ddraw_test (0x0033fe28) [/home/cahrendt/wine-git/dlls/ddraw/tests/../../../include/wine/test.h:503] in ddraw_test (0x0033fed8) [/home/cahrendt/wine-git/dlls/winecrt0/exe_entry.c:36] in ddraw_test (0x0033ff08) [/home/cahrendt/wine-git/dlls/kernel32/process.c:904] in kernel32 (0x0033ffe8) [/home/cahrendt/wine-git/dlls/ddraw/tests/dsurface.c:1404] in ddraw_test: call *0x8(%edx) 0x602ec680 AttachmentTest+0xfa0
The Thread that Loaded the Module would be nice here if we can get it:
Modules: Module Address Debug info Name (55 modules) ELF 626000- 62f000 Deferred libsm.so.6 ELF 640000- 65c000 Deferred ld-linux.so.2 ELF 65e000- 7a1000 Deferred libc.so.6 ELF 7a3000- 7ca000 Deferred libm.so.6 ELF 7cc000- 7d0000 Deferred libdl.so.2 ELF 7d2000- 7e9000 Deferred libpthread.so.0 ELF 800000- 809000 Deferred librt.so.1
Specifying this is an application thread or a WINE thread would be nice along with the resources that each thread had / has at the time would be as well. So if Thread c is a wine thread for kernel say WINE thread for kernel if that is possible.
Threads: process tid prio (all id:s are in hex) 0000000c 00000014 0 00000013 0 00000012 0 0000000e 0 0000000d 0 0000000f 00000016 0 00000015 0 00000011 0 00000010 0 0000002d 0000002e 0 00000033 (D) Z:\home\cahrendt\wine-git\dlls\ddraw\tests\ddraw_test.exe 00000034 0 <==
Why do we need another backtrace when we have it above?
Backtrace: =>1 0x602ec680 AttachmentTest+0xfa0() [/home/cahrendt/wine-git/dlls/ddraw/tests/dsurface.c:1404] in ddraw_test (0x0033f2b8) 2 0x602f1735 func_dsurface+0x2175() [/home/cahrendt/wine-git/dlls/ddraw/tests/dsurface.c:2764] in ddraw_test (0x0033fde8) 3 0x60301bd8 run_test+0x128(name="dsurface.c") [/home/cahrendt/wine-git/dlls/ddraw/tests/../../../include/wine/test.h:454] in ddraw_test (0x0033fe28) 4 0x60302442 main+0x122(argc=<register ECX not in topmost frame>, argv=<register ECX not in topmost frame>) [/home/cahrendt/wine-git/dlls/ddraw/tests/../../../include/wine/test.h:503] in ddraw_test (0x0033fed8) 5 0x603025bb __wine_spec_exe_entry+0x5b(peb=0x7ffdf000) [/home/cahrendt/wine-git/dlls/winecrt0/exe_entry.c:36] in ddraw_test (0x0033ff08) 6 0x7b874207 start_process+0xc7(arg=(nil)) [/home/cahrendt/wine-git/dlls/kernel32/process.c:904] in kernel32 (0x0033ffe8)