gdb/testsuite: gdb.base/args.exp: add KFAIL for native-extended-gdbserver
[binutils-gdb.git] / gdb / target-connection.c
index 35c786bc1c69d4381c0553bcd9775e478c0fa1fc..a649423e07e771457c623d1a5a18d4322752a271 100644 (file)
@@ -1,6 +1,6 @@
 /* List of target connections for GDB.
 
-   Copyright (C) 2017-2020 Free Software Foundation, Inc.
+   Copyright (C) 2017-2021 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -53,12 +53,9 @@ connection_list_remove (process_stratum_target *t)
   t->connection_number = 0;
 }
 
-/* Make a target connection string for T.  This is usually T's
-   shortname, but it includes the result of
-   process_stratum_target::connection_string() too if T supports
-   it.  */
+/* See target-connection.h.  */
 
-static std::string
+std::string
 make_target_connection_string (process_stratum_target *t)
 {
   if (t->connection_string () != NULL)
@@ -136,7 +133,7 @@ print_connection (struct ui_out *uiout, const char *requested_connections)
 
       uiout->field_signed ("number", t->connection_number);
 
-      uiout->field_string ("what", make_target_connection_string (t).c_str ());
+      uiout->field_string ("what", make_target_connection_string (t));
 
       uiout->field_string ("description", t->longname ());
 
@@ -152,6 +149,8 @@ info_connections_command (const char *args, int from_tty)
   print_connection (current_uiout, args);
 }
 
+void _initialize_target_connection ();
+
 void
 _initialize_target_connection ()
 {