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]

Re: [PATCH] Remove dead serial_interface_lookup calls


On 17-01-11 10:58:47, Simon Marchi wrote:
> 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.

It would be nice to show the commits remove these serial interfaces.

> 
>  gdb/ChangeLog:
> 
> 	* serial.c (serial_open): Forget about "pc" and "lpt" serial interface.

Patch is good to me.

> ---
>  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");

It was removed by cb2a4ac5dae478fcd9d6e772530c3aba0576fc7a

-static struct serial_ops e7000pc_ops =
-{
-  "pc",
-  0,
-  e7000pc_open,
-  e7000pc_close,
-  e7000pc_readchar,
-  e7000pc_write,
-  e7000pc_noop,                        /* flush output */

> -  else if (startswith (name, "lpt"))
> -    ops = serial_interface_lookup ("parallel");

It was removed by e386d4d2fb55042f77d0557a0849ed2464aee7b3

-static struct serial_ops go32_ops =
-{
-  "parallel",
-  0,
-  go32_open,
-  go32_close,
-  go32_readchar,
-  go32_write,
-  go32_noop,			/* flush output */

-- 
Yao (齐尧)


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