From: Vladimir Prus Date: Sat, 4 Nov 2006 08:37:24 +0000 (+0000) Subject: 2006-11-04 Vladimir Prus X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8b9e3a1523b9e01e996ff276be2cb35b67543284;p=binutils-gdb.git 2006-11-04 Vladimir Prus * serial.c (serial_open): Strip leading spaces from program name when opening pipe. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4b7720adec3..65b808a767c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2006-11-04 Vladimir Prus + + * serial.c (serial_open): Strip leading spaces from program + name when opening pipe. + 2006-11-03 Jim Blandy * dwarf2loc.c (dwarf_expr_read_reg): Use frame_unwind_register diff --git a/gdb/serial.c b/gdb/serial.c index 6a2c634cb34..77b28f8feff 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