Clear GDB internal state after each unit test
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.
This commit is contained in:
parent
88c1242dc0
commit
7a3929c417
3 changed files with 14 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
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.
|
||||
|
|
|
@ -81,6 +81,10 @@ tests_with_arch ()
|
|||
_("Self test failed: arch %s: "), arches[i]);
|
||||
}
|
||||
END_CATCH
|
||||
|
||||
/* Clear GDB internal state. */
|
||||
registers_changed ();
|
||||
reinit_frame_cache ();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -53,6 +53,10 @@ run_self_tests (void)
|
|||
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"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue