From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20897 invoked by alias); 3 Nov 2006 15:33:35 -0000 Received: (qmail 20888 invoked by uid 22791); 3 Nov 2006 15:33:35 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 03 Nov 2006 15:33:29 +0000 Received: (qmail 12178 invoked from network); 3 Nov 2006 15:33:27 -0000 Received: from unknown (HELO ?172.16.64.38?) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 3 Nov 2006 15:33:27 -0000 From: Vladimir Prus To: gdb-patches@sources.redhat.com Subject: Fix target remote pipe error message Date: Fri, 03 Nov 2006 15:33:00 -0000 User-Agent: KMail/1.9.1 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_9E2SFj6r3KjlbLt" Message-Id: <200611031833.17855.vladimir@codesourcery.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-11/txt/msg00019.txt.bz2 --Boundary-00=_9E2SFj6r3KjlbLt Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 458 I've just run into this: (gdb) target remote | foobar (gdb) error starting child process ' foobar': CreateProcess: No such file or directory Note the leading space before 'foobar' in the error message. That might suggest that space between "|" and program name is the problem while it's not. This patch fixes the error message. OK? - Volodya * serial.c (serial_open): Strip leading spaces from program name when opening pipe. --Boundary-00=_9E2SFj6r3KjlbLt Content-Type: text/x-diff; charset="us-ascii"; name="serial.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="serial.diff" Content-length: 696 Index: serial.c =================================================================== RCS file: /cvs/src/src/gdb/serial.c,v retrieving revision 1.26 diff -u -r1.26 serial.c --- serial.c 24 Apr 2006 21:00:13 -0000 1.26 +++ serial.c 3 Nov 2006 15:30:16 -0000 @@ -189,7 +189,10 @@ else if (strncmp (name, "|", 1) == 0) { ops = serial_interface_lookup ("pipe"); - open_name = name + 1; /* discard ``|'' */ + /* discard ``|'' and any space before the command itself. */ + ++open_name; + while (isspace (*open_name)) + ++open_name; } /* Check for a colon, suggesting an IP address/port pair. Do this *after* checking for all the interesting prefixes. We --Boundary-00=_9E2SFj6r3KjlbLt--