winedbg - howto

Questions about Wine on Linux
Locked
vladakk
Newbie
Newbie
Posts: 3
Joined: Thu Sep 17, 2020 3:08 am

winedbg - howto

Post by vladakk »

To continue working with winedbg, I need help from someone who has more experience in using winedbg.
I tried to do attach to WPID and here's what the situation looks like:
[root@vlada-kuci tmp 15:13:54]$ /asoft-src/ispp-64/mingw64/GetNamedSecurityInfoA/GetNamedSecurityInfoA/wine-gdb.sh 272
WINEPREFIX=/mnt/WD-Elements-25A1/src/wine-git/install64
WINESERVER=/mnt/WD-Elements-25A1/src/wine-git/install64/bin/wineserver
WINELOADER=/mnt/WD-Elements-25A1/src/wine-git/install64/bin/wine64
WINEDLLPATH=/mnt/WD-Elements-25A1/src/wine-git/install64/lib64/wine
LD_LIBRARY_PATH=/mnt/WD-Elements-25A1/src/wine-git/install64/lib64/wine:
PATH=/mnt/WD-Elements-25A1/src/wine-git/install64/bin:/root/.cargo/bin:/mnt/sdd1/home/src/postgresql-devel/20210205/bin:/root/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin
wine64 version=wine-6.9-81-g8ddff3f51fa
WINEDEBUG=
/mnt/WD-Elements-25A1/src/wine-git/install64/bin/winedbg ...
pid threads executable (all id:s are in hex)
00000164 1 'start.exe'
0000016c 1 \_ 'conhost.exe'
00000068 3 'explorer.exe'
00000038 7 'services.exe'
000000d4 6 \_ 'rpcss.exe'
000000c0 3 \_ 'svchost.exe'
00000080 7 \_ 'winedevice.exe'
00000060 5 \_ 'plugplay.exe'
00000044 4 \_ 'winedevice.exe'
00000020 1 'start.exe'
00000100 1 \_ 'cmd.exe'
00000110 2 \_ 'pomocni-llvm-mingw.exe'
000000f8 1 \_ 'conhost.exe'
WineDbg starting on pid 0110
^C019c:fixme:console:default_ctrl_handler Terminating process 17c on event 0
Ctrl-C: stopping debuggee
[root@vlada-kuci tmp 15:14:55]$ Process of pid=0110 has terminated
Wine-dbg>quit
bash: quit: command not found
[root@vlada-kuci tmp 15:19:55]$
After the windbg start on the "winedbg starting on pid 0110" program is in some wait and I want to see backtrace at that moment.
It is natural that winedbg stops debug and have the possibility of "bt" which I am trying to do with "Ctrl-c".
However, appears that winedbg ends the debug what is presumed from the lines that follow ?
It is indicative that after "Ctrl-c" and the displayed prompt on the terminal, winedbg is still an active process !
SetantaLP
Level 3
Level 3
Posts: 54
Joined: Mon Jul 31, 2017 3:55 am

Re: winedbg - howto

Post by SetantaLP »

I only have some experience with winedbg, but from what I saw it is definitely normal that winedbg is still running if the debugged program exited (you have to exit it manually by typing q) and the easiest way to interact with the process is starting it with the debugger and then carefully stepping through the instructions with stepi, because as long as only one thread is running (which should be the case when you start the program) the debugger waits for your input once it has finished doing what the previous command said. What should also work is setting breakpoints in the program, because once the debugger hits a breakpoint it should pause execution.

According to https://wiki.winehq.org/Wine_Developer% ... terrupting it is intended that Ctrl+C stops the debugged process, but it allows you to manipulate the context.
Locked