GDB has some global variables, like sentinel_frame,
current_thread_arch, and etc, we need to reset them after each unit
tests.
gdb:
2017-05-24 Yao Qi <yao.qi@linaro.org>
* selftest-arch.c (tests_with_arch): Call registers_changed
and reinit_frame_cache.
* selftest.c (run_self_tests): Likewise.
+2017-05-24 Yao Qi <yao.qi@linaro.org>
+
+ * selftest-arch.c (tests_with_arch): Call registers_changed
+ and reinit_frame_cache.
+ * selftest.c (run_self_tests): Likewise.
+
2017-05-24 Yao Qi <yao.qi@linaro.org>
* rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
_("Self test failed: arch %s: "), arches[i]);
}
END_CATCH
+
+ /* Clear GDB internal state. */
+ registers_changed ();
+ reinit_frame_cache ();
}
}
exception_fprintf (gdb_stderr, ex, _("Self test failed: "));
}
END_CATCH
+
+ /* Clear GDB internal state. */
+ registers_changed ();
+ reinit_frame_cache ();
}
printf_filtered (_("Ran %lu unit tests, %d failed\n"),