public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Fix target remote pipe command for MinGW
@ 2023-01-02 15:10 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2023-01-02 15:10 UTC (permalink / raw)
  To: gdb-cvs

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

commit c43d829bca5e45c5e6c0255a549abc5766f6de7f
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.

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-02 15:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-02 15:10 [binutils-gdb] Fix target remote pipe command for MinGW Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).