diff options
Diffstat (limited to 'gdb/selftest.c')
-rw-r--r-- | gdb/selftest.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/gdb/selftest.c b/gdb/selftest.c index 14b76f6..c947749 100644 --- a/gdb/selftest.c +++ b/gdb/selftest.c @@ -15,8 +15,15 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ - +#include "config.h" +#ifdef GDBSERVER +#define QUIT do {} while (0) +#else #include "defs.h" +#endif +#include "common-defs.h" +#include "common-exceptions.h" +#include "common-debug.h" #include "selftest.h" #include <vector> @@ -50,15 +57,24 @@ run_self_tests (void) CATCH (ex, RETURN_MASK_ERROR) { ++failed; + #ifndef GDBSERVER exception_fprintf (gdb_stderr, ex, _("Self test failed: ")); + #endif } END_CATCH +#ifndef GDBSERVER /* Clear GDB internal state. */ registers_changed (); reinit_frame_cache (); +#endif } + #ifdef GDBSERVER + debug_printf ("Ran %lu unit tests, %d failed\n", + (long) tests.size (), failed); + #else printf_filtered (_("Ran %lu unit tests, %d failed\n"), (long) tests.size (), failed); + #endif } |