https://bugs.winehq.org/show_bug.cgi?id=50973
Bug ID: 50973 Summary: winedbg --gdb exits immediately Product: Wine Version: 6.5 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winedbg Assignee: wine-bugs@winehq.org Reporter: grandchild@mailbox.org Distribution: ---
Hi,
similar to https://bugs.winehq.org/show_bug.cgi?id=50117 but from version 6.5 onwards, "winedbg --gdb" exits immediately and runs the program, instead of showing the gdb shell, which used to stop after loading but before running the program.
Version 6.4 does not have this issue.
I've git-bisected it down to this commit:
28fe84da45bea7de56539b50eac8ebcec54342de Author: Alexandre Julliard julliard@winehq.org Date: Wed Mar 24 10:53:53 2021 +0100 ntdll: Load the main image from the Unix side.
Unfortunately this is a massive commit, and I can't right now put in the time to dig deeper into what might be causing the gdb mode to exit early. Also it doesn't revert easy on the latest version, 6.6. Maybe someone has a quicker understanding of where to look within that change. If not I can start digging deeper myself.
To reproduce:
winedbg --gdb notepad.exe
OS info: latest Archlinux x86-64
Regards, Jakob
https://bugs.winehq.org/show_bug.cgi?id=50973
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, regression
https://bugs.winehq.org/show_bug.cgi?id=50973
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |julliard@winehq.org Regression SHA1| |28fe84da45bea7de56539b50eac | |8ebcec54342de
https://bugs.winehq.org/show_bug.cgi?id=50973
grandchild grandchild@mailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Distribution|--- |ArchLinux
https://bugs.winehq.org/show_bug.cgi?id=50973
grandchild grandchild@mailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |grandchild@mailbox.org
https://bugs.winehq.org/show_bug.cgi?id=50973
grandchild grandchild@mailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|grandchild@mailbox.org |
https://bugs.winehq.org/show_bug.cgi?id=50973
Bernhard Übelacker bernhardu@mailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bernhardu@mailbox.org
--- Comment #1 from Bernhard Übelacker bernhardu@mailbox.org --- Created attachment 69934 --> https://bugs.winehq.org/attachment.cgi?id=69934 50973_debugging.txt
I wondered too about 'winedbg --gdb' no longer working.
It seems this commit changes the stdin/stdout/stderr of the gdb process. Therefore a 'ISATTY (ui->instream)' inside gdb is now failing, and it exits as far as gdb expects a user input.
Another hint into that directions is the copyright information of gdb is no longer visible, but was before that commit.
https://bugs.winehq.org/show_bug.cgi?id=50973
--- Comment #2 from Bernhard Übelacker bernhardu@mailbox.org --- A possible workaround seems to be: winedbg --gdb --with-xterm
https://bugs.winehq.org/show_bug.cgi?id=50973
--- Comment #3 from Bernhard Übelacker bernhardu@mailbox.org --- After a little more digging it showed me that with commit 28fe84da4 winedbg.exe is not started itself any longer, instead a start.exe is started which creates the winedbg process.
So basically it behaves like this: wine start.exe winedbg --gdb notepad
And another workaround would be to start winedbg with full path: wine c:\windows\system32\winedbg.exe --gdb notepad
https://bugs.winehq.org/show_bug.cgi?id=50973
--- Comment #4 from Bernhard Übelacker bernhardu@mailbox.org --- It looks like before in following functions the PATH got iterated for a usable executable: process_init / init_user_process_params / get_image_path / RtlDosSearchPath_U
A place for somthing simliar at "unix side" might be here: start_main_thread / init_startup_info / build_initial_params (If the start.exe invocation is not desired.)
https://bugs.winehq.org/show_bug.cgi?id=50973
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |DUPLICATE
--- Comment #5 from Alexandre Julliard julliard@winehq.org --- Actually it's the same bug, it's only visible when starting a child process, which start.exe does by default now.
*** This bug has been marked as a duplicate of bug 50117 ***
https://bugs.winehq.org/show_bug.cgi?id=50973
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Closing Duplicate