This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Remove dead serial_interface_lookup calls
- From: Simon Marchi <simon dot marchi at ericsson dot com>
- To: <gdb-patches at sourceware dot org>
- Cc: Simon Marchi <simon dot marchi at ericsson dot com>
- Date: Wed, 11 Jan 2017 10:58:47 -0500
- Subject: [PATCH] Remove dead serial_interface_lookup calls
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=simon dot marchi at ericsson dot com;
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
By inspecting the serial_add_interface calls, I found that the serial
interface names that we have today are:
- hardwire
- terminal
- pipe
- tcp
- event
The calls to serial_interface_lookup with any other names are most
likely leftovers which can be removed since these serial interfaces
don't exist anymore. If you go back to the commits that added the
lines this patch removes, you'll find the serial interface that existed
at that time.
gdb/ChangeLog:
* serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
---
gdb/serial.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/gdb/serial.c b/gdb/serial.c
index ac7c1b99c1..afb70758c6 100644
--- a/gdb/serial.c
+++ b/gdb/serial.c
@@ -209,11 +209,7 @@ serial_open (const char *name)
const struct serial_ops *ops;
const char *open_name = name;
- if (strcmp (name, "pc") == 0)
- ops = serial_interface_lookup ("pc");
- else if (startswith (name, "lpt"))
- ops = serial_interface_lookup ("parallel");
- else if (startswith (name, "|"))
+ if (startswith (name, "|"))
{
ops = serial_interface_lookup ("pipe");
/* Discard ``|'' and any space before the command itself. */
--
2.11.0