gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / gdb / ser-tcp.c
index 079f24828e921d087b273a9c0613204df69c3c6a..7dd903dfaad6bd9ecf06a20e31f021f32e3aff8c 100644 (file)
@@ -1,6 +1,6 @@
 /* Serial interface for raw TCP connections on Un*x like systems.
 
-   Copyright (C) 1992-2019 Free Software Foundation, Inc.
+   Copyright (C) 1992-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -58,7 +58,7 @@
 #endif
 
 #include <signal.h>
-#include "gdb_select.h"
+#include "gdbsupport/gdb_select.h"
 #include <algorithm>
 
 #ifndef HAVE_SOCKLEN_T
@@ -307,7 +307,7 @@ net_open (struct serial *scb, const char *name)
   /* Flag to indicate whether we've got a connection refused.  It will
      be true if any of the connections tried was refused.  */
   bool got_connrefused;
-  /* If a connection succeeeds, SUCCESS_AINFO will point to the
+  /* If a connection succeeds, SUCCESS_AINFO will point to the
      'struct addrinfo' that succeed.  */
   struct addrinfo *success_ainfo = NULL;
   unsigned int polls = 0;
@@ -424,20 +424,6 @@ ser_tcp_send_break (struct serial *scb)
   return (serial_write (scb, "\377\363", 2));
 }
 
-/* Support for "set tcp" and "show tcp" commands.  */
-
-static void
-set_tcp_cmd (const char *args, int from_tty)
-{
-  help_list (tcp_set_cmdlist, "set tcp ", all_commands, gdb_stdout);
-}
-
-static void
-show_tcp_cmd (const char *args, int from_tty)
-{
-  help_list (tcp_show_cmdlist, "show tcp ", all_commands, gdb_stdout);
-}
-
 #ifndef USE_WIN32API
 
 /* The TCP ops.  */
@@ -469,8 +455,9 @@ static const struct serial_ops tcp_ops =
 
 #endif /* USE_WIN32API */
 
+void _initialize_ser_tcp ();
 void
-_initialize_ser_tcp (void)
+_initialize_ser_tcp ()
 {
 #ifdef USE_WIN32API
   /* Do nothing; the TCP serial operations will be initialized in
@@ -479,16 +466,16 @@ _initialize_ser_tcp (void)
   serial_add_interface (&tcp_ops);
 #endif /* USE_WIN32API */
 
-  add_prefix_cmd ("tcp", class_maintenance, set_tcp_cmd, _("\
+  add_basic_prefix_cmd ("tcp", class_maintenance, _("\
 TCP protocol specific variables.\n\
 Configure variables specific to remote TCP connections."),
-                 &tcp_set_cmdlist, "set tcp ",
-                 0 /* allow-unknown */, &setlist);
-  add_prefix_cmd ("tcp", class_maintenance, show_tcp_cmd, _("\
+                       &tcp_set_cmdlist, "set tcp ",
+                       0 /* allow-unknown */, &setlist);
+  add_show_prefix_cmd ("tcp", class_maintenance, _("\
 TCP protocol specific variables.\n\
 Configure variables specific to remote TCP connections."),
-                 &tcp_show_cmdlist, "show tcp ",
-                 0 /* allow-unknown */, &showlist);
+                      &tcp_show_cmdlist, "show tcp ",
+                      0 /* allow-unknown */, &showlist);
 
   add_setshow_boolean_cmd ("auto-retry", class_obscure,
                           &tcp_auto_retry, _("\
This page took 0.029369 seconds and 4 git commands to generate.