From c43d829bca5e45c5e6c0255a549abc5766f6de7f Mon Sep 17 00:00:00 2001 From: Jonas Hoerberg Date: Thu, 22 Dec 2022 15:22:17 +0000 Subject: [PATCH] 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. --- gdb/ser-mingw.c | 6 ++++++ 1 file changed, 6 insertions(+) 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') -- 2.30.2