From: Jonas Hoerberg Date: Thu, 22 Dec 2022 15:22:17 +0000 (+0000) Subject: Fix target remote pipe command for MinGW X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c43d829bca5e45c5e6c0255a549abc5766f6de7f;p=binutils-gdb.git Fix target remote pipe command for MinGW The cced7cacecad104fff0 ("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 '| ': CreateProcess: No such file or directory This commit add the missing '|' detection and removal to ser-mingw.c. --- diff --git a/gdb/ser-mingw.c b/gdb/ser-mingw.c index 232da59bdbf..7de55f6d7ac 100644 --- a/gdb/ser-mingw.c +++ b/gdb/ser-mingw.c @@ -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')