aboutsummaryrefslogtreecommitdiff
path: root/gdb/serial.c
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2006-11-04 08:37:24 +0000
committerVladimir Prus <vladimir@codesourcery.com>2006-11-04 08:37:24 +0000
commit8b9e3a1523b9e01e996ff276be2cb35b67543284 (patch)
tree22b6f0f6c8bb14d0a82a97d9a190902aa2990442 /gdb/serial.c
parentf4f5eb403fecae6b3e46b1cff6b403af5c3ddc00 (diff)
downloadfsf-binutils-gdb-8b9e3a1523b9e01e996ff276be2cb35b67543284.zip
fsf-binutils-gdb-8b9e3a1523b9e01e996ff276be2cb35b67543284.tar.gz
fsf-binutils-gdb-8b9e3a1523b9e01e996ff276be2cb35b67543284.tar.bz2
2006-11-04 Vladimir Prus <vladimir@codesourcery.com>
* serial.c (serial_open): Strip leading spaces from program name when opening pipe.
Diffstat (limited to 'gdb/serial.c')
-rw-r--r--gdb/serial.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/serial.c b/gdb/serial.c
index 6a2c634..77b28f8 100644
--- a/gdb/serial.c
+++ b/gdb/serial.c
@@ -189,7 +189,10 @@ serial_open (const char *name)
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