[gdb/testsuite] Ignore pass in gdb_caching_proc
Before commit
d4295de4f3 "[gdb/testsuite] Handle missing gnatmake in
gnat_runtime_has_debug_info", calling the gdb_caching_proc
gnat_runtime_has_debug_info could generate a pass because of using
gdb_compile_ada.
This has been fixed in that commit by using a factored out variant
gdb_compile_ada_1, which does not call pass.
Additionally, fix cases like this in more generic way: by ignoring pass calls
during execution of a gdb_caching_proc.
Build and reg-tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2020-02-19 Tom de Vries <tdevries@suse.de>
* lib/cache.exp (ignore_pass, gdb_do_cache_wrap): New proc.
(gdb_do_cache): Use gdb_do_cache_wrap.
* gdb.base/gdb-caching-proc.exp (test_proc): Use gdb_do_cache_wrap.