You are not logged in.

#1 2025-08-17 01:59:27

Ypixcm
Member
Registered: 2024-07-11
Posts: 35
Website

Using gdb to debug Windows programs can cause freezing.

I encountered this problem when using pince. When pince debugs Windows programs under Wine, it causes the program to freeze. Then, even when I used gdb or winedbg --gdb, the same issue occurred. I don't have knowledge in this area, but I would like to know why.




https://tc-new.z.wiki/autoupload/f/DnFe … C9A0A.jpeg

reason:

https://docs.kernel.org/admin-guide/LSM/Yama.html

Last edited by Ypixcm (2025-08-18 02:51:08)


My new name: RethLibc

Offline

#2 2025-08-18 02:59:32

Ypixcm
Member
Registered: 2024-07-11
Posts: 35
Website

Re: Using gdb to debug Windows programs can cause freezing.

I tried using `sudo sysctl kernel.yama.ptrace_scope=0` and then debugging the Wine program with GDB, but it still freeze

winedbg --gdb 300
WineDbg attached to pid 012c
012c:0130: create process 'Z:\home\cm\test\Minesweeper-Windows-XP\WINMINE.EXE'/0000000000000000 @0000000001003E21 (0<0>)
016c:fixme:dbghelp:elf_search_auxv can't find symbol in module
012c:0130: create thread I @0000000001003E21
GNU gdb (GDB) 16.3
Copyright (C) 2024 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 "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
012c:0130: loads DLL C:\windows\system32\ntdll.dll @00006FFFFFF30000 (692224<2>)
012c:0130: loads DLL C:\windows\system32\ntdll.dll @000000007BF30000 (735232<2>)
012c:0130: loads DLL C:\windows\system32\wow64.dll @00006FFFFE990000 (122368<272>)
012c:0130: loads DLL C:\windows\system32\wow64cpu.dll @000000007BF10000 (8192<18>)
012c:0130: loads DLL C:\windows\system32\wow64win.dll @00006FFFFE960000 (90624<483>)
012c:0130: loads DLL C:\windows\system32\win32u.dll @00006FFFFF550000 (259072<9>)
012c:0130: loads DLL C:\windows\system32\kernel32.dll @000000007BE90000 (396800<926>)
012c:0130: loads DLL C:\windows\system32\kernelbase.dll @000000007BBD0000 (2750976<426>)
012c:0130: loads DLL C:\windows\system32\msvcrt.dll @000000007BB00000 (718848<148>)
012c:0130: loads DLL C:\windows\system32\ADVAPI32.dll @000000007BAB0000 (235520<300>)
012c:0130: loads DLL C:\windows\system32\sechost.dll @000000007BA80000 (111104<93>)
012c:0130: loads DLL C:\windows\system32\ucrtbase.dll @000000007B980000 (936448<156>)
012c:0130: loads DLL C:\windows\system32\GDI32.dll @000000007B8E0000 (539136<261>)
012c:0130: loads DLL C:\windows\system32\user32.dll @000000007B6F0000 (1895936<577>)
012c:0130: loads DLL C:\windows\system32\win32u.dll @000000007B690000 (273408<9>)
012c:0130: loads DLL C:\windows\system32\SHELL32.dll @000000007AD30000 (9726976<471>)
012c:0130: loads DLL C:\windows\system32\shlwapi.dll @000000007ACD0000 (291840<441>)
012c:0130: loads DLL C:\windows\system32\shcore.dll @000000007ACA0000 (79360<83>)
012c:0130: loads DLL C:\windows\system32\WINMM.dll @000000007ABC0000 (737280<153>)
012c:0130: loads DLL C:\windows\system32\msacm32.dll @000000007AB80000 (113664<81>)
012c:0130: loads DLL C:\windows\system32\ole32.dll @000000007AAB0000 (758272<323>)
012c:0130: loads DLL C:\windows\system32\combase.dll @000000007AA40000 (313344<154>)
012c:0130: loads DLL C:\windows\system32\rpcrt4.dll @000000007A9A0000 (550912<112>)
012c:0130: loads DLL C:\windows\system32\cryptbase.dll @000000007A980000 (14336<32>)
012c:0130: loads DLL C:\windows\system32\coml2.dll @000000007A950000 (71680<41>)
012c:0130: loads DLL C:\windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.2600.2982_none_deadbeef\COMCTL32.dll @000000007A7E
0000 (1392128<402>)
012c:0130: loads DLL C:\windows\system32\imm32.dll @000000007A7B0000 (102912<134>)
012c:0130: loads DLL C:\windows\system32\oleaut32.dll @000000007A6D0000 (672256<249>)
012c:0130: loads DLL c:\windows\system32\winex11.drv @000000007A6B0000 (40960<265>)
012c:0130: loads DLL C:\windows\system32\uxtheme.dll @000000007A660000 (200192<152>)
012c:0170: create thread D @00006FFFFFF40BC4
warning: remote target does not support file transfer, attempting to access files from local filesystem.
Reading symbols from /home/cm/test/Minesweeper-Windows-XP/WINMINE.EXE...

This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.archlinux.org>
Enable debuginfod for this session? (y or [n]) [answered N; input not from terminal]
Debuginfod has been disabled.
To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit.
(No debugging symbols found in /home/cm/test/Minesweeper-Windows-XP/WINMINE.EXE)
016c:fixme:dbghelp:elf_search_auxv can't find symbol in module
0xfff40bc4 in ?? ()
016c:fixme:dbghelp:elf_search_auxv can't find symbol in module
Wine-gdb> 

My new name: RethLibc

Offline

Board footer

Powered by FluxBB