Re: Building today's snapshot of GDB with MinGW

Eli Zaretskii
2020-07-01T15:20:48Z

I tried today "gdb --tui" on Windows 10, and was surprised to find
that it doesn't work: the debuggee fails to start when you type "run"
or "start". Windows pops up a dialog saying

The application was unable to start correctly (0xc0000142)
Click OK to close the application.

The application whose name is shown on the popup is the debuggee, but
the Windows Event Log shows a crash in the Windows console host.

This is not new, I see the same problem in all versions of GDB back to
7.9. It could be related to running a 32-bit debugger on 64-bit
Windows OS, though.

The only discussion of this that seems relevant is here:

https://github.com/msys2/MINGW-packages/issues/1744

I tried the workaround mentioned there with "set new-console on", and
it didn't work. The discussion further suggests to switch the Windows
console to the legacy mode, which I didn't try (because it affects all
console windows and requires restart AFAICT). This URL is from 4
years ago, so maybe the current builds of Windows 10 are different;
the version I tried this on is build 18362.836.

Did anyone try running "gdb --tui" on Windows 10 console, and if so,
did that work for you?