From: Jim Blandy <jimb@red-bean.com>
To: gdb-patches@sources.redhat.com
Subject: RFA: parse 'target remote' device special cases first
Date: Thu, 09 Mar 2006 04:38:00 -0000 [thread overview]
Message-ID: <vt2bqwgscgf.fsf@theseus.home.> (raw)
Without this change, if the command supplied after 'target remote |'
contained a colon, the portion of the command ahead of that colon
would be mistaken for a hostname. But the syntax isn't actually
ambiguous, since hostnames don't start with '|'.
Tested on x86_64-pc-linux-gnu.
src/gdb/ChangeLog:
2006-03-08 Jim Blandy <jimb@red-bean.com>
* serial.c (serial_open): Check for special cases at the front of
the "device" name before scanning for the ':' that would indicate
an IP-based connection.
Index: src/gdb/serial.c
===================================================================
--- src.orig/gdb/serial.c
+++ src/gdb/serial.c
@@ -184,8 +184,6 @@ serial_open (const char *name)
if (strcmp (name, "pc") == 0)
ops = serial_interface_lookup ("pc");
- else if (strchr (name, ':'))
- ops = serial_interface_lookup ("tcp");
else if (strncmp (name, "lpt", 3) == 0)
ops = serial_interface_lookup ("parallel");
else if (strncmp (name, "|", 1) == 0)
@@ -193,6 +191,8 @@ serial_open (const char *name)
ops = serial_interface_lookup ("pipe");
open_name = name + 1; /* discard ``|'' */
}
+ else if (strchr (name, ':'))
+ ops = serial_interface_lookup ("tcp");
else
ops = serial_interface_lookup ("hardwire");
next reply other threads:[~2006-03-09 0:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-09 4:38 Jim Blandy [this message]
2006-03-25 7:18 ` Daniel Jacobowitz
2006-04-11 20:32 ` Jim Blandy
2006-04-11 20:42 ` Daniel Jacobowitz
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=vt2bqwgscgf.fsf@theseus.home. \
--to=jimb@red-bean.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