/* 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.
#endif
#include <signal.h>
-#include "gdb_select.h"
+#include "gdbsupport/gdb_select.h"
#include <algorithm>
#ifndef HAVE_SOCKLEN_T
/* 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;
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. */
#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
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, _("\