why I cannot use winedbg --gdb

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
cikka
Level 1
Level 1
Posts: 5
Joined: Tue Jul 15, 2008 9:02 pm

why I cannot use winedbg --gdb

Post by cikka »

when I run Oblivion.exe by "winedbg --gdb", the following message appear, then it is blocked, I cannot type any letter in the terminal.

if I run winedbg without "--gdb", it is OK.

anyone can help? thanks!



root@robwang:/mnt/home/Oblivion# winedbg --gdb Oblivion.exe
0016:0017: create process 'Z:\mnt\home\Oblivion\Oblivion.exe'/0x110670 @0x96434c (0<0>)
0016:0017: create thread I @0x96434c
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
0016:0017: loads DLL C:\windows\system32\KERNEL32.dll @0x7ee20000 (0<0>)
0016:0017: loads DLL C:\windows\system32\ntdll.dll @0x7ef70000 (0<0>)
0016:0017: loads DLL Z:\mnt\home\Oblivion\Oblivion.exe @0x400000 (0<0>)
0016:0017: loads DLL C:\windows\system32\advapi32.dll @0x7eae0000 (0<0>)
0016:0017: loads DLL C:\windows\system32\gdi32.dll @0x7eb40000 (0<0>)
0016:0017: loads DLL C:\windows\system32\user32.dll @0x7ebe0000 (0<0>)
0016:0017: loads DLL C:\windows\system32\comctl32.dll @0x7ed20000 (0<0>)
0016:0017: loads DLL C:\windows\system32\iphlpapi.dll @0x7e970000 (0<0>)
0016:0017: loads DLL C:\windows\system32\rpcrt4.dll @0x7e990000 (0<0>)
0016:0017: loads DLL C:\windows\system32\ole32.dll @0x7e9f0000 (0<0>)
0016:0017: loads DLL C:\windows\system32\dinput.dll @0x7ea90000 (0<0>)
0016:0017: loads DLL C:\windows\system32\dinput8.dll @0x7ead0000 (0<0>)
0016:0017: loads DLL C:\windows\system32\winmm.dll @0x7e8d0000 (0<0>)
0016:0017: loads DLL C:\windows\system32\dsound.dll @0x7e880000 (0<0>)
0016:0017: loads DLL Z:\mnt\home\Oblivion\binkw32.dll @0x18000000 (0<0>)
0016:0017: loads DLL C:\windows\system32\shlwapi.dll @0x7e710000 (0<0>)
0016:0017: loads DLL C:\windows\system32\shell32.dll @0x7e770000 (0<0>)
0016:0017: loads DLL C:\windows\system32\lz32.dll @0x7e6e0000 (0<0>)
0016:0017: loads DLL C:\windows\system32\version.dll @0x7e6f0000 (0<0>)
0016:0017: loads DLL ????????????? @0x7e6c0000 (0<0>)
00000016:00000017: unload DLL @0x7e6c0000
0016:0017: loads DLL C:\windows\system32\msvcrt.dll @0x7e680000 (0<0>)
0016:0017: loads DLL Z:\mnt\home\Oblivion\d3dx9_27.dll @0xb80000 (0<0>)
0016:0017: loads DLL C:\windows\system32\ws2_32.dll @0x7e630000 (0<0>)
0016:0017: loads DLL C:\windows\system32\wsock32.dll @0x7e660000 (0<0>)
0016:0017: loads DLL C:\windows\system32\imm32.dll @0x7e340000 (0<0>)
0016:0017: loads DLL C:\windows\system32\winex11.drv @0x7e4a0000 (0<0>)
0016:0017: loads DLL C:\windows\system32\uxtheme.dll @0x7e2e0000 (0<0>)
0016:0017: loads DLL C:\windows\system32\winealsa.drv @0x7e2d0000 (0<0>)
00000016:00000017: unload DLL @0x7e2d0000
0016:0017: loads DLL C:\windows\system32\wineoss.drv @0x7e2a0000 (0<0>)
0016:0017: loads DLL C:\windows\system32\msacm32.dll @0x7e260000 (0<0>)
0016:0017: loads DLL C:\windows\system32\msacm32.drv @0x7e290000 (0<0>)
0016:0017: loads DLL C:\windows\system32\midimap.dll @0x7e250000 (0<0>)
00000016:00000017: exception code=0x80000003
warning: Target reported unsupported offsets: Text=00000004;Data=0033fd54;Bss=b7e85973
[New Thread 23]
start_process (arg=0x0) at process.c:904
904 ExitThread( entry( peb ) );
trace: 98 => 80
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: why I cannot use winedbg --gdb

Post by vitamin »

cikka wrote:when I run Oblivion.exe by "winedbg --gdb", the following message appear, then it is blocked, I cannot type any letter in the terminal.
GDB proxy been broken for some time now. So yes it does not work.
cikka
Level 1
Level 1
Posts: 5
Joined: Tue Jul 15, 2008 9:02 pm

Re: why I cannot use winedbg --gdb

Post by cikka »

whan can result to gdb proxy broken, How can I solve it.
and when I use winedbg to debug, I cannot print the vaule of the local variable some times. why?

Thanks!






vitamin wrote:
cikka wrote:when I run Oblivion.exe by "winedbg --gdb", the following message appear, then it is blocked, I cannot type any letter in the terminal.
GDB proxy been broken for some time now. So yes it does not work.
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: why I cannot use winedbg --gdb

Post by vitamin »

cikka wrote:whan can result to gdb proxy broken, How can I solve it.
Start hacking Wine. You can't magically fix it.
cikka wrote:and when I use winedbg to debug, I cannot print the vaule of the local variable some times. why?
Should work. If if doesn't - file a bug report with exact steps to reproduce.

Your best bet would be to start Wine process suspended (or add a long long sleep somewhere at the start). Then attach to it with gdb.
You can also directly run Wine under gdb. You just have to start wine-pthread not wine. See developer's doc for more options and other details.
cikka
Level 1
Level 1
Posts: 5
Joined: Tue Jul 15, 2008 9:02 pm

Re: why I cannot use winedbg --gdb

Post by cikka »

vitamin wrote:
cikka wrote:whan can result to gdb proxy broken, How can I solve it.
Start hacking Wine. You can't magically fix it.
cikka wrote:and when I use winedbg to debug, I cannot print the vaule of the local variable some times. why?
Should work. If if doesn't - file a bug report with exact steps to reproduce.

Your best bet would be to start Wine process suspended (or add a long long sleep somewhere at the start). Then attach to it with gdb.
You can also directly run Wine under gdb. You just have to start wine-pthread not wine. See developer's doc for more options and other details.

Thanks! Which thread should I attach with gdb if I want to debug into libgl.so. When I use command "ps -e", there are many thread related to wine, e.g.wineserver; device.exe; app.exe; etc.
I have tried attach every thread, it seems neither can make me break into libgl.so.

Thanks!!
cikka
Level 1
Level 1
Posts: 5
Joined: Tue Jul 15, 2008 9:02 pm

Re: why I cannot use winedbg --gdb

Post by cikka »

Thanks vitamin. using gdb start wine-pthread make everything work fine. it solved the problem which puzzled me several weeks. But I do not see any article mentioned it in wine development doc.

Thanks a lot!!!


cikka wrote:
vitamin wrote:
cikka wrote:whan can result to gdb proxy broken, How can I solve it.
Start hacking Wine. You can't magically fix it.
cikka wrote:and when I use winedbg to debug, I cannot print the vaule of the local variable some times. why?
Should work. If if doesn't - file a bug report with exact steps to reproduce.

Your best bet would be to start Wine process suspended (or add a long long sleep somewhere at the start). Then attach to it with gdb.
You can also directly run Wine under gdb. You just have to start wine-pthread not wine. See developer's doc for more options and other details.

Thanks! Which thread should I attach with gdb if I want to debug into libgl.so. When I use command "ps -e", there are many thread related to wine, e.g.wineserver; device.exe; app.exe; etc.
I have tried attach every thread, it seems neither can make me break into libgl.so.

Thanks!!
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: why I cannot use winedbg --gdb

Post by vitamin »

cikka wrote:Thanks vitamin. using gdb start wine-pthread make everything work fine. it solved the problem which puzzled me several weeks. But I do not see any article mentioned it in wine development doc.
http://www.winehq.org/site/docs/winedev ... dbg-others
Locked