Hi all!
As a saw a few updates to the debugger a couple of days ago, I decided to give the debugger another go. The problem with the stack trace is gone now, but now I get another problem when I attach to a running process, set a breakpoint and continue, the program crashes. When I in- stead don't set a breakpoint and continue, the program keeps running "fine":
When setting the breakpoint:
chipzz@Vector:~/.wine-clean/win/dotnet.inst$ winedbg fixme:console:SetConsoleCtrlHandler (0x4059e880,1) - no error checking or testing yet Wine-dbg>info process pid threads parent executable (all id:s are in hex) 00000008 4 00000000 'H:.wine-clean\win\dotnet.inst\install.exe' Wine-dbg>attach 8 fixme:dbghelp:addr_to_linear Failed to linearize address 8000:00000000 (mode 0) In 32 bit mode. Wine-dbg>bt Backtrace: =>1 0x40107b4b __read+0x4b in libc.so.6 (0x40307c54) 2 0x401cc472 NTDLL_wait_for_multiple_objects+0x122 in ntdll (0x40307cf8) 3 0x401ca9dc vm86_return_end+0xc55 in ntdll (0x40307d1c) 4 0x40067678 (0x423bcc4c) 5 0x401cc472 NTDLL_wait_for_multiple_objects+0x122 in ntdll (0x423bccf0) 6 0x401cc4e6 NtWaitForMultipleObjects+0x66 in ntdll (0x423bcd18) 7 0x404e25a5 WaitForMultipleObjectsEx+0xb5 in kernel32 (0x423bce48) 8 0x40cd54cc X11DRV_MsgWaitForMultipleObjectsEx+0x5c in x11drv (0x423bcf80) 9 0x408d9294 MsgWaitForMultipleObjectsEx+0x134 in user32 (0x423bd128) 10 0x408d9351 MsgWaitForMultipleObjects+0x41 in user32 (0x423bd148) 11 0x4163b91a (0x40915980) 12 0x7d8920ec (0x83e58955) fixme:dbghelp:addr_to_linear Failed to linearize address 8000:00000000 (mode 0) 13 0x8000:0x0000 (0x11b7:0x0800) 14 0x8000:0x0800 (0x11b7:0x0000) Wine-dbg>break MessageBoxA err:dbghelp:pe_load_dbg_file -Unable to peruse .DBG file ole32.dbg ("H:\.wine-clean\win\dotnet.inst") err:dbghelp:pe_load_dbg_file -Unable to peruse .DBG file oleaut32.dbg ("H:\.wine-clean\win\dotnet.inst") err:dbghelp:pe_load_dbg_file -Unable to peruse .DBG file rpcrt4.dbg ("H:\.wine-clean\win\dotnet.inst") err:dbghelp_msc:codeview_process_info Unknown CODEVIEW signature 53445352 in module msvcr80 fixme:dbghelp:symt_get_info Unsupported sym-tag SymTagPublicSymbol for get-type Many symbols with name 'MessageBoxA', choose the one you want (<cr> to abort): [1]: 0x408db030 MessageBoxA in user32 [2]: 0x40ad7760 MessageBoxA in shell32 [3]: 0x40107b00 __libc_read in libc.so.6 => 1 Breakpoint 1 at 0x408db030 MessageBoxA in user32 Wine-dbg>c
First chance exception: page fault on read access to 0x00000040 in 32-bit code (0x4281009e). Register dump: CS:0023 SS:002b DS:002b ES:002b FS:11af GS:0000 EIP:4281009e ESP:423be038 EBP:423be0a4 EFLAGS:00010246( - 00 -RIZP1) EAX:00000000 EBX:00000000 ECX:77710800 EDX:00000000 ESI:00000000 EDI:000000a0 Stack dump: 0x423be038: 79655066 796fc52b 00000000 000000a0 0x423be048: 00000000 00000000 40340000 00000002 0x423be058: 00000034 404bec3f 00000007 423be084 0x423be068: 70a948ad 00000409 00000001 403b62f8 0x423be078: ffffffff 79670df4 ffffffff 423be0b8 0x423be088: 70a95755 00000001 354ae8a4 423be044 0235: sel=11af base=40306000 limit=00001fff 32-bit rw- Backtrace: =>1 0x4281009e (0x423be0a4) 2 0x796fc558 (0x423be0dc) 3 0x796fc705 (0x423be12c) 4 0x796fd494 (0x423be1d0) 5 0x00750073 (0x00690056) 6 0x00000000 (0x00000000) 0x4281009e: movl 0x40(%eax),%eax Wine-dbg>c First chance exception: page fault on read access to 0x00000040 in 32-bit code (0x4281009e). ... etc.
When not setting the breakpoint:
chipzz@Vector:~/.wine-clean/win/dotnet.inst$ winedbg fixme:console:SetConsoleCtrlHandler (0x4059e880,1) - no error checking or testing yet Wine-dbg>attach 8 fixme:dbghelp:addr_to_linear Failed to linearize address 8000:00000000 (mode 0) In 32 bit mode. Wine-dbg>c
Also, ctrl-c doesn't work to stop the program being debugged. Wien version is wine CVS Aug 23.
Any help is appreciated!
kr,
Chipzz AKA Jan Van Buggenhout
PS: Please cc me as I'm not on the list.
Chipzz a écrit :
Hi all!
As a saw a few updates to the debugger a couple of days ago, I decided to give the debugger another go. The problem with the stack trace is gone now, but now I get another problem when I attach to a running process, set a breakpoint and continue, the program crashes. When I in- stead don't set a breakpoint and continue, the program keeps running "fine":
When setting the breakpoint: [...] 10 0x408d9351 MsgWaitForMultipleObjects+0x41 in user32 (0x423bd148) 11 0x4163b91a (0x40915980)
this looks bad as a backtrace (the bp -in parenthesis- goes south). It could dbghelp not supporting modules with FPO (frame pointer omission). If you recompile wine, could you change the #if 0 in dlls/dbghelp/msc.c in function pe_load_debug_directory into a #if 1, and see what gives. Afterwards, the stack lookup goes wrong, hence the 16 bit addresses.
I'm don't know what goes wrong afterwards after setting the breakpoint or not. Even the issues from above shouldn't impact the debuggee.
Also, ctrl-c doesn't work to stop the program being debugged. Wien version is wine CVS Aug 23.
I'm working on it.
A+
Sorry for the late reply, but I was out of town for the weekend.
Anyway, it fails to compile:
Vector:/usr/src/wine/wine-0.0.20040615/dlls/dbghelp# make gcc -c -I. -I. -I../../include -I../../include -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe -mpreferred-stack-boundary=2 -fno-strict-aliasing -gstabs+ -Wpointer-arith -O2 -g -o msc.o msc.c msc.c: In function `pe_load_debug_directory': msc.c:3049: warning: implicit declaration of function `DEBUG_Printf' ../../tools/winegcc/winegcc -B../../tools/winebuild -shared ./dbghelp.spec dbghelp.o elf_module.o image.o memory.o minidump.o module.o msc.o path.o pe_module.o source.o stabs.o stack.o storage.o symbol.o type.o dbghelp.dll.dbg.o -o dbghelp.dll.so -L../../dlls -lpsapi -lkernel32 -lntdll -L../../libs/wine -lwine -L../../libs/port -lwine_port msc.o(.text+0x4256): In function `pe_load_debug_directory': /usr/src/wine/wine-0.0.20040615/dlls/dbghelp/msc.c:3049: undefined reference to `DEBUG_Printf' collect2: ld returned 1 exit status winegcc: gcc failed. make: *** [dbghelp.dll.so] Error 2
(Don't look at the date in the directory, it actually is the cvs version as of 2004/08/26)
I only changed the #if on line 3042.
Anything else I need to change (or update to latest CVS)?
On Fri, 27 Aug 2004, Eric Pouech wrote:
Chipzz a écrit :
Hi all!
As a saw a few updates to the debugger a couple of days ago, I decided to give the debugger another go. The problem with the stack trace is gone now, but now I get another problem when I attach to a running process, set a breakpoint and continue, the program crashes. When I in- stead don't set a breakpoint and continue, the program keeps running "fine":
When setting the breakpoint: [...] 10 0x408d9351 MsgWaitForMultipleObjects+0x41 in user32 (0x423bd148) 11 0x4163b91a (0x40915980)
this looks bad as a backtrace (the bp -in parenthesis- goes south). It could dbghelp not supporting modules with FPO (frame pointer omission). If you recompile wine, could you change the #if 0 in dlls/dbghelp/msc.c in function pe_load_debug_directory into a #if 1, and see what gives. Afterwards, the stack lookup goes wrong, hence the 16 bit addresses.
I'm don't know what goes wrong afterwards after setting the breakpoint or not. Even the issues from above shouldn't impact the debuggee.
Also, ctrl-c doesn't work to stop the program being debugged. Wien version is wine CVS Aug 23.
I'm working on it.
A+
kr,
Chipzz AKA Jan Van Buggenhout
(Don't look at the date in the directory, it actually is the cvs version as of 2004/08/26)
I only changed the #if on line 3042.
change the DEBUG_Printf into a FIXME, that'll do it