aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJonas Hoerberg <JHorberg@danfoss.com>2022-12-22 15:22:17 +0000
committerTom Tromey <tromey@adacore.com>2023-01-02 07:58:58 -0700
commitc43d829bca5e45c5e6c0255a549abc5766f6de7f (patch)
tree381524f931eee962992b7018fc81f23dea411329 /gdb
parentdacf80765d51be840d2efc20bc058643d88ec49f (diff)
downloadgdb-c43d829bca5e45c5e6c0255a549abc5766f6de7f.zip
gdb-c43d829bca5e45c5e6c0255a549abc5766f6de7f.tar.gz
gdb-c43d829bca5e45c5e6c0255a549abc5766f6de7f.tar.bz2
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 '| <executable> <args>': CreateProcess: No such file or directory This commit add the missing '|' detection and removal to ser-mingw.c.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ser-mingw.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/ser-mingw.c b/gdb/ser-mingw.c
index 232da59..7de55f6 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')