http://bugs.winehq.org/show_bug.cgi?id=23222
--- Comment #14 from Anastasius Focht focht@gmx.net 2010-06-21 15:31:15 --- Hello,
well you could provide some info using winedbg in gdb proxy mode (winedbg alone doesn't work well within signal handlers). Make sure you compiled Wine with symbols. Start the executable as follows:
--- snip --- $ winedbg --gdb ./DiE.exe 0041:0047: create process 'C:\Program Files\die\DiE.exe'/0x110698 @0x535e0c (0<0>) ... 00000041:00000047: exception code=0xc0000005 create_alpha_bitmap ... --- snip ---
It should break at first chance exception from shell32's icon cache init. This is expected and harmless. Now instruct gdb to pass those exceptions to app handler:
--- snip --- $ handle SIGSEGV pass nostop noprint --- snip ---
Press continue "c" to pass it, you'll see output like this:
--- snip --- Wine-gdb> c Continuing. trying to process a verbose packet trying to process a verbose packet trying to process a verbose packet trying to process a verbose packet trying to process a verbose packet trying to process a verbose packet trying to process a verbose packet trying to process a verbose packet trying to process a verbose packet trying to process a verbose packet trying to process a verbose packet
Program received signal SIGTRAP, Trace/breakpoint trap. start_process (peb=0x7ffdf000) at ../../../wine-git/dlls/kernel32/process.c:996 --- snip ---
The debugger stops at program entry point (as expected). Because you will most likely hit a bug/encounter erroneous SIGSEGVs we revert the SIGSEGV handling behaviour back to defaults:
--- snip --- Wine-gdb> handle SIGSEGV pass stop print Signal Stop Print Pass to program Description SIGSEGV Yes Yes Yes Segmentation fault --- snip ---
Do another continue "c". If everything works you should see the single step trap like this:
--- snip --- Wine-gdb> c Continuing. trying to process a verbose packet
Program received signal SIGTRAP, Trace/breakpoint trap. 0x00535f9f in ?? () --- snip ---
This is the single step instruction within app code and this needs to be specially handled.
If you don't see the SIGTRAP after continuing from program entry point (for example you get a SIGSEGV instead of SIGTRAP), please do a backtrace "bt" and "info reg" command at this point and attach the complete output of debugging session.
Otherwise (good case) you need to instruct gdb to pass this special one to signal handler like this:
--- snip --- $ handle SIGTRAP pass nostop --- snip ---
The debugger will ask you a question, answer with "yes"
--- snip --- SIGTRAP is used by the debugger. Are you sure you want to change it? (y or n) y Signal Stop Print Pass to program Description SIGTRAP No Yes Yes Trace/breakpoint trap --- snip ---
Continue "c". The debugger should now stop at SIGSEGV due to explicit icon load from app (would not been seen if we didn't revert the SIGSEGV back to defaults):
--- snip --- Wine-gdb> c Continuing. trying to process a verbose packet
Program received signal SIGTRAP, Trace/breakpoint trap. trying to process a verbose packet
Program received signal SIGSEGV, Segmentation fault. 0x685c9dcd in create_alpha_bitmap (color=<value optimized out>, mask=<value optimized out>, src_info=0x128f98, color_bits=0x68676330) --- snip ---
Continue "c" and the app GUI should be shown.
Regards