This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Remove dead serial_interface_lookup calls


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]