From: Vladimir Prus <vladimir@codesourcery.com>
To: gdb-patches@sources.redhat.com
Subject: Fix target remote pipe error message
Date: Fri, 03 Nov 2006 15:33:00 -0000 [thread overview]
Message-ID: <200611031833.17855.vladimir@codesourcery.com> (raw)
[-- 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
next reply other threads:[~2006-11-03 15:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-03 15:33 Vladimir Prus [this message]
2006-11-03 15:36 ` Daniel Jacobowitz
2006-11-03 23:43 ` Mark Kettenis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200611031833.17855.vladimir@codesourcery.com \
--to=vladimir@codesourcery.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox