]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/unittests/parse-connection-spec-selftests.c
gdb: add back declarations for _initialize functions
[thirdparty/binutils-gdb.git] / gdb / unittests / parse-connection-spec-selftests.c
index ac7cd41e21229f1c3136b4bd509e4fcafd7d79f0..6c0df356425d812c0496882d3db1872f619a7bd5 100644 (file)
@@ -1,6 +1,6 @@
 /* Self tests for parsing connection specs for GDB, the GNU debugger.
 
-   Copyright (C) 2018-2019 Free Software Foundation, Inc.
+   Copyright (C) 2018-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "common/selftest.h"
-#include "common/netstuff.h"
+#include "gdbsupport/selftest.h"
+#include "gdbsupport/netstuff.h"
 #include "diagnostics.h"
 #ifdef USE_WIN32API
-#include <winsock2.h>
-#include <wspiapi.h>
+#include <ws2tcpip.h>
 #else
 #include <netinet/in.h>
 #include <arpa/inet.h>
@@ -209,18 +208,17 @@ test_conn (const parse_conn_test &c)
 
   memset (&hint, 0, sizeof (hint));
 
-  TRY
+  try
     {
       ret = parse_connection_spec (c.connspec, &hint);
     }
-  CATCH (ex, RETURN_MASK_ERROR)
+  catch (const gdb_exception_error &ex)
     {
       /* If we caught an error, we should check if this connection
         spec was supposed to fail.  */
       SELF_CHECK (c.should_fail);
       return;
     }
-  END_CATCH
 
   SELF_CHECK (!c.should_fail);
   SELF_CHECK (ret.host_str == c.expected_result.host_str);
@@ -241,6 +239,7 @@ run_tests ()
 } /* namespace parse_connection_spec_tests */
 } /* namespace selftests */
 
+void _initialize_parse_connection_spec_selftests ();
 void
 _initialize_parse_connection_spec_selftests ()
 {