Re: [patch] gdb/testsuite: Fix POSIX-isms in gdb.base/shell.exp

Christian Biesinger
2020-06-25T22:36:41Z

On Thu, Jun 25, 2020 at 12:57 PM Sandra Loosemore
<sandra@codesourcery.com> wrote:
>
> On 6/25/20 11:32 AM, Christian Biesinger wrote:
> > On Wed, Jun 24, 2020 at 8:35 PM Sandra Loosemore
> > <sandra@codesourcery.com> wrote:
> >>
> >> This patch fixes a group of failures in gdb.base/shell.exp on Windows
> >> host due to assumptions that GDB is launching a POSIX-like shell. On
> >> Windows, we get CMD.EXE instead.
> >
> > Hmm, if I call runtest/make check from an msys2 shell, do I really get
> > cmd.exe here? I ask because i wonder how many people run this from
> > cmd.exe as opposed to msys's shell, so it may be better to check for
> > cmd more specifically somehow (maybe $SHELL?)
>
> I'm not familiar with the msys2 shell, but....
>
> On Windows host GDB uses the system() function provided by the host C
> library to launch a shell and does not consult $SHELL at all. This is
> in shell_escape in gdb/cli/cli-cmds.c.

Ah sorry, I didn't realize that this shell use came from GDB, I had
assumed this was from dejagnu. This (unofficially) looks good then.

Christian