Subject: Re: bug#69795: 29.1; cmdproxy.exe exits automatically after executing MSYS2 commands

From: [email-masked]
Date: Fri, 15 Mar 2024 21:10:06 +0900

Eli Zaretskii <[email-masked]> writes:

>> From: [email-masked]
>> Cc: [email-masked]
>> Date: Fri, 15 Mar 2024 00:56:02 +0900
>> 
>> Replacing 'ls -ld .' with 'ls -d .', which outputs only '.',
>> cmdproxy.exe exits, too.
>> Replacing 'ls -d .' with 'ls -d . < nul' does not make cmdproxy.exe exit.
>
> If cmdproxy exits, it probably means cmd.exe that cmdproxy runs
> exited.  The shell-mode buffer interacts with cmd.exe, not with
> cmdproxy.  cmdproxy in this scenario is used only to start an inferior
> cmd.exe.
>
> You may wish looking in the Windows Event Log, under Application.  It
> is possible that there's some useful information there about why you
> see that shell process finishes, like which program crashed and why.

Nothing about crash or similar is recorded.

>> I only needed gdb, another binary will do. But I do not know where to
>> get a reliable gdb binary run with emacs shell-mode.
>
> Doesn't MSYS2 provide a MinGW64 build of GDB, not just an MSYS build?
> GDB builds natively with MinGW tools, so there should be no problem
> for MSYS2 folks to provide a native 64-bit Windows build of GDB.

I have installed mingw64/mingw-w64-x86_64-gdb.
I think it is MinGW64 binary.
But gdb.exe sometimes make cmdproxy.exe exit, and sometimes not.

Here is a list of gdb packages.

$ pacman -Ss 'gdb$'
mingw32/mingw-w64-i686-arm-none-eabi-gdb 9.2-8 (mingw-w64-i686-arm-none-eabi-toolchain)
    GNU Tools for ARM Embedded Processors - GDB (mingw-w64)
mingw32/mingw-w64-i686-avr-gdb 12.1-1 (mingw-w64-i686-avr-toolchain)
    The GNU Debugger for AVR (mingw-w64)
mingw32/mingw-w64-i686-gdb 13.2-3 (mingw-w64-i686-toolchain)
    GNU Debugger (mingw-w64)
mingw64/mingw-w64-x86_64-arm-none-eabi-gdb 9.2-8 (mingw-w64-x86_64-arm-none-eabi-toolchain)
    GNU Tools for ARM Embedded Processors - GDB (mingw-w64)
mingw64/mingw-w64-x86_64-avr-gdb 12.1-1 (mingw-w64-x86_64-avr-toolchain)
    The GNU Debugger for AVR (mingw-w64)
mingw64/mingw-w64-x86_64-gdb 13.2-3 (mingw-w64-x86_64-toolchain) [installed]
    GNU Debugger (mingw-w64)
ucrt64/mingw-w64-ucrt-x86_64-arm-none-eabi-gdb 9.2-8 (mingw-w64-ucrt-x86_64-arm-none-eabi-toolchain)
    GNU Tools for ARM Embedded Processors - GDB (mingw-w64)
ucrt64/mingw-w64-ucrt-x86_64-avr-gdb 12.1-1 (mingw-w64-ucrt-x86_64-avr-toolchain)
    The GNU Debugger for AVR (mingw-w64)
ucrt64/mingw-w64-ucrt-x86_64-gdb 13.2-3 (mingw-w64-ucrt-x86_64-toolchain)
    GNU Debugger (mingw-w64)
clang32/mingw-w64-clang-i686-arm-none-eabi-gdb 9.2-8 (mingw-w64-clang-i686-arm-none-eabi-toolchain)
    GNU Tools for ARM Embedded Processors - GDB (mingw-w64)
clang32/mingw-w64-clang-i686-avr-gdb 12.1-1 (mingw-w64-clang-i686-avr-toolchain)
    The GNU Debugger for AVR (mingw-w64)
clang32/mingw-w64-clang-i686-gdb 13.2-3
    GNU Debugger (mingw-w64)
clang64/mingw-w64-clang-x86_64-arm-none-eabi-gdb 9.2-8 (mingw-w64-clang-x86_64-arm-none-eabi-toolchain)
    GNU Tools for ARM Embedded Processors - GDB (mingw-w64)
clang64/mingw-w64-clang-x86_64-avr-gdb 12.1-1 (mingw-w64-clang-x86_64-avr-toolchain)
    The GNU Debugger for AVR (mingw-w64)
clang64/mingw-w64-clang-x86_64-gdb 13.2-3
    GNU Debugger (mingw-w64)
msys/cgdb 0.8.0-2
    Curses-based interface to the GNU Debugger
msys/gdb 13.2-1
    GNU Debugger (MSYS2 version)