Fix target remote pipe command for MinGW

The cced7cacec ("gdb: preserve `|` in connection details string")
commit added '|' detection and removal to ser-pipe.c, but missed to add it
to ser-mingw.c.

This results in the error message below for MinGW hosts:
error starting child process '| <executable> <args>': CreateProcess: No such file or directory

This commit add the missing '|' detection and removal to ser-mingw.c.

(cherry picked from commit c43d829bca)
This commit is contained in:
Jonas Hoerberg
2022-12-22 15:22:17 +00:00
committed by Tom Tromey
parent 33214e7a6d
commit 08bdba1418

View File

@@ -867,6 +867,12 @@ pipe_windows_open (struct serial *scb, const char *name)
if (name == NULL)
error_no_arg (_("child command"));
if (*name == '|')
{
name++;
name = skip_spaces (name);
}
gdb_argv argv (name);
if (! argv[0] || argv[0][0] == '\0')