X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Funittests%2Fparse-connection-spec-selftests.c;h=6c0df356425d812c0496882d3db1872f619a7bd5;hb=a350efd4fb368a35ada608f6bc26ccd3bed0ae6b;hp=ac7cd41e21229f1c3136b4bd509e4fcafd7d79f0;hpb=0747795c085d3b2a35da6bb474f32c58ce1b70c8;p=deliverable%2Fbinutils-gdb.git
diff --git a/gdb/unittests/parse-connection-spec-selftests.c b/gdb/unittests/parse-connection-spec-selftests.c
index ac7cd41e21..6c0df35642 100644
--- a/gdb/unittests/parse-connection-spec-selftests.c
+++ b/gdb/unittests/parse-connection-spec-selftests.c
@@ -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.
@@ -18,12 +18,11 @@
along with this program. If not, see . */
#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
-#include
+#include
#else
#include
#include
@@ -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 ()
{