[binutils-gdb/gdb-13-branch] Fix target remote pipe command for MinGW

Tom Tromey tromey@sourceware.org
Mon Jan 2 15:11:29 GMT 2023


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=08bdba1418053b34ba641f84d1215f17424e2c3d

commit 08bdba1418053b34ba641f84d1215f17424e2c3d
Author: Jonas Hoerberg <JHorberg@danfoss.com>
Date:   Thu Dec 22 15:22:17 2022 +0000

    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.
    
    (cherry picked from commit c43d829bca5e45c5e6c0255a549abc5766f6de7f)

Diff:
---
 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')


More information about the Gdb-cvs mailing list