X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fcommon%2Fselftest.c;h=f5a7b3c344b5cba6ad9416386db0ea0ba517dd54;hb=5b0e2db4fa08b43e9ff78d6e9a45d496522bd241;hp=867626cba8203069ab944d122bd934dc8e0ee08a;hpb=e2882c85786571175a0b0bfc3bcd2f14620b1ea3;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/common/selftest.c b/gdb/common/selftest.c index 867626cba8..f5a7b3c344 100644 --- a/gdb/common/selftest.c +++ b/gdb/common/selftest.c @@ -1,5 +1,5 @@ /* GDB self-testing. - Copyright (C) 2016-2018 Free Software Foundation, Inc. + Copyright (C) 2016-2019 Free Software Foundation, Inc. This file is part of GDB. @@ -81,18 +81,17 @@ run_tests (const char *filter) && name.find (filter) == std::string::npos) continue; - TRY + try { debug_printf (_("Running selftest %s.\n"), name.c_str ()); ++ran; (*test) (); } - CATCH (ex, RETURN_MASK_ERROR) + catch (const gdb_exception_error &ex) { ++failed; - debug_printf ("Self test failed: %s\n", ex.message); + debug_printf ("Self test failed: %s\n", ex.what ()); } - END_CATCH reset (); }