Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Fix target remote pipe error message
@ 2006-11-03 15:33 Vladimir Prus
  2006-11-03 15:36 ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Prus @ 2006-11-03 15:33 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 458 bytes --]


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.




[-- Attachment #2: serial.diff --]
[-- Type: text/x-diff, Size: 696 bytes --]

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Fix target remote pipe error message
  2006-11-03 15:33 Fix target remote pipe error message Vladimir Prus
@ 2006-11-03 15:36 ` Daniel Jacobowitz
  2006-11-03 23:43   ` Mark Kettenis
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2006-11-03 15:36 UTC (permalink / raw)
  To: Vladimir Prus; +Cc: gdb-patches

On Fri, Nov 03, 2006 at 06:33:17PM +0300, Vladimir Prus wrote:
> This patch fixes the error message. OK?
> 
> - Volodya
> 
> 	* serial.c (serial_open): Strip leading spaces from program name
> 	when opening pipe.

OK.

> -      open_name = name + 1; /* discard ``|'' */
> +      /* discard ``|'' and any space before the command itself. */

Two spaces after period please.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Fix target remote pipe error message
  2006-11-03 15:36 ` Daniel Jacobowitz
@ 2006-11-03 23:43   ` Mark Kettenis
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Kettenis @ 2006-11-03 23:43 UTC (permalink / raw)
  To: Vladimir Prus, gdb-patches

>  On Fri, Nov 03, 2006 at 06:33:17PM +0300, Vladimir Prus wrote:
> > This patch fixes the error message. OK?
> >
> > - Volodya
> >
> > 	* serial.c (serial_open): Strip leading spaces from program name
> > 	when opening pipe.
>
>  OK.
>
> > -      open_name = name + 1; /* discard ``|'' */
> > +      /* discard ``|'' and any space before the command itself. */
>
>  Two spaces after period please.

And start the sentence with a capital...



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-11-03 23:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-03 15:33 Fix target remote pipe error message Vladimir Prus
2006-11-03 15:36 ` Daniel Jacobowitz
2006-11-03 23:43   ` Mark Kettenis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox