[PATCH] Remove dead serial_interface_lookup calls

Simon Marchi simon.marchi@ericsson.com
Wed Jan 11 15:59:00 GMT 2017


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



More information about the Gdb-patches mailing list