https://bugs.winehq.org/show_bug.cgi?id=45490
Bug ID: 45490 Summary: 'winedbg' backtraces broken for 32-bit processes in 64-bit WINEPREFIX Product: Wine Version: 3.13 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: dbghelp Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net Distribution: ---
Hello folks,
apparently no one uses 'winedbg' to debug native apps which is understandable ;-)
Backtraces are broken for 32-bit processes in 64-bit WINEPREFIX (affecting crash reports, 'bt all', etc.)
Regression caused by: https://source.winehq.org/git/wine.git/commitdiff/8b3294a4dd975eb44bda3ab581...
--- snip --- winedbg: Always start the interactive debugger in 64-bit mode if in a 64-bit prefix. author Zebediah Figura zfigura@codeweavers.com Wed, 13 Jun 2018 21:34:02 +0000 (16:34 -0500) committer Alexandre Julliard julliard@winehq.org Thu, 14 Jun 2018 07:29:14 +0000 (09:29 +0200) Signed-off-by: Zebediah Figura zfigura@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org --- snip ---
Before (any 32-bit app):
--- snip --- $ winedbg ./ILDownloadManager.exe
WineDbg starting on pid 0061 DbgBreakPoint () at /home/focht/projects/wine/mainline-src/include/winternl.h:2259 0x7b46b6f4 DbgBreakPoint+0x4 [/home/focht/projects/wine/mainline-src/include/winternl.h:2259] in kernel32: nop 2259 static inline void WINAPI DbgBreakPoint(void) { __asm__ __volatile__("int3"); }
Wine-dbg>bt
Backtrace: =>0 0x7b46b6f4 DbgBreakPoint+0x4() [/home/focht/projects/wine/mainline-src/include/winternl.h:2259] in kernel32 (0x0033fed8) 1 0x7b46dbe4 start_process+0x119(entry=<couldn't compute location>, peb=<couldn't compute location>) [/home/focht/projects/wine/mainline-src/dlls/kernel32/process.c:1098] in kernel32 (0x0033ffd8) 2 0x7b46daca start_process_wrapper+0x9() in kernel32 (0x0033ffec) --- snip ---
After:
--- snip --- $ winedbg ./ILDownloadManager.exe
WineDbg starting on pid 0032 DbgBreakPoint () at /home/focht/projects/wine/mainline-src/include/winternl.h:2259 0x000000007b46b6f4 DbgBreakPoint+0x4 [/home/focht/projects/wine/mainline-src/include/winternl.h:2259] in kernel32: nop 2259 static inline void WINAPI DbgBreakPoint(void) { __asm__ __volatile__("int3"); }
Wine-dbg>bt
Backtrace: =>0 0x000000007b46b6f4 DbgBreakPoint+0x4() [/home/focht/projects/wine/mainline-src/include/winternl.h:2259] in kernel32 (0x000000000033fed8) 1 0x000000007b46b6f4 DbgBreakPoint+0x3() [/home/focht/projects/wine/mainline-src/include/winternl.h:2259] in kernel32 (0x000000000033fed8) 2 0x000000007b46b6f4 DbgBreakPoint+0x3() [/home/focht/projects/wine/mainline-src/include/winternl.h:2259] in kernel32 (0x000000000033fed8) 3 0x000000007b46b6f4 DbgBreakPoint+0x3() [/home/focht/projects/wine/mainline-src/include/winternl.h:2259] in kernel32 (0x000000000033fed8) 4 0x000000007b46b6f4 DbgBreakPoint+0x3() [/home/focht/projects/wine/mainline-src/include/winternl.h:2259] in kernel32 (0x000000000033fed8) 5 0x000000007b46b6f4 DbgBreakPoint+0x3() [/home/focht/projects/wine/mainline-src/include/winternl.h:2259] in kernel32 (0x000000000033fed8) --- snip ---
Another example of dumping thread callstack using 'winedbg' in Wine 3.10:
--- snip -- Wine-dbg>bt
Backtrace: =>0 0xf7f73047 __kernel_vsyscall+0x7() in [vdso].so (0x0033f508) 1 0xf7d40907 __libc_read+0x66() in libpthread.so.0 (0x0033f508) 2 0x7bc8f9a7 wait_select_reply+0x1e(cookie=0x33f5ec) [/home/focht/projects/wine/mainline-src/dlls/ntdll/server.c:359] in ntdll (0x0033f508) 3 0x7bc9086b server_select+0x163(select_op=0x33f644, size=0x8, flags=0x2, timeout=0x33f7d8) [/home/focht/projects/wine/mainline-src/dlls/ntdll/server.c:618] in ntdll (0x0033f618) 4 0x7bc9abd4 wait_objects+0xb6(count=0x1, handles=0x33f7e0, wait_any=1, alertable=0, timeout=0x33f7d8) [/home/focht/projects/wine/mainline-src/dlls/ntdll/sync.c:1031] in ntdll (0x0033f758) 5 0x7bc9ac12 NtWaitForMultipleObjects+0x38(count=<couldn't compute location>, handles=<couldn't compute location>, wait_any=1, alertable=0, timeout=<couldn't compute location>) [/home/focht/projects/wine/mainline-src/dlls/ntdll/sync.c:1042] in ntdll (0x0033f798) 6 0x7b47e641 WaitForMultipleObjectsEx+0xad(count=<couldn't compute location>, handles=<couldn't compute location>, wait_all=<couldn't compute location>, timeout=<couldn't compute location>, alertable=<couldn't compute location>) [/home/focht/projects/wine/mainline-src/dlls/kernel32/sync.c:221] in kernel32 (0x0033f8f8) 7 0x7b47e4c3 WaitForSingleObject+0x24(handle=<couldn't compute location>, timeout=<couldn't compute location>) [/home/focht/projects/wine/mainline-src/dlls/kernel32/sync.c:160] in kernel32 (0x0033f938) 8 0x0041f3b9 in ildownloadmanager (+0x1f3b8) (0x0033f964) 9 0x0047bce0 in ildownloadmanager (+0x7bcdf) (0x0072efb8) 10 0x0072f650 (0x0058aca4) 11 0x0047b9f0 in ildownloadmanager (+0x7b9ef) (0x0047b7a0) --- snip ---
With Wine 3.11:
--- snip --- 0x00000000f7fc1047: int $0x80 Wine-dbg>bt Backtrace: =>0 0x00000000f7fc1047 (0x000000000033f508) 1 0x00000000f7fc1047 (0x000000000033f508) 2 0x00000000f7fc1047 (0x000000000033f508) 3 0x00000000f7fc1047 (0x000000000033f508) 4 0x00000000f7fc1047 (0x000000000033f508) 5 0x00000000f7fc1047 (0x000000000033f508) 6 0x00000000f7fc1047 (0x000000000033f508) 7 0x00000000f7fc1047 (0x000000000033f508) 8 0x00000000f7fc1047 (0x000000000033f508) 9 0x00000000f7fc1047 (0x000000000033f508) --- snip ---
It still works when using 32-bit WINEPREFIX for 32-bit apps. That's not a solution though as various apps/games consist of a mix of 64-bit/32-bit components/helper apps. Also people tend to recycle their default (WoW64) prefix for multiple apps/games.
$ wine --version wine-3.13
Regards
https://bugs.winehq.org/show_bug.cgi?id=45490
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression Regression SHA1| |8b3294a4dd975eb44bda3ab581e | |e9958d300d5d3 CC| |z.figura12@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=45490
--- Comment #1 from Zebediah Figura z.figura12@gmail.com --- Confirming; it's broken because it misreads DWARF info. I have some fixes which I'm working on.
https://bugs.winehq.org/show_bug.cgi?id=45490
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=45490
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Fixed by SHA1| |42745c068f80b696e7402680a61 | |c2006b68b01d0 Resolution|--- |FIXED
--- Comment #2 from Zebediah Figura z.figura12@gmail.com --- Should be fixed in latest master.
https://bugs.winehq.org/show_bug.cgi?id=45490
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 3.14.