Ensure index cache entry written in test
authorTom Tromey <tromey@adacore.com>
Fri, 3 Mar 2023 16:41:35 +0000 (09:41 -0700)
committerTom Tromey <tromey@adacore.com>
Tue, 7 Mar 2023 14:58:30 +0000 (07:58 -0700)
commitf0c3dcc1ca714cb17602f4c12c00b3604f36b035
treeb70a41eefe31b11bce3893b748b03917b127581e
parente9f59c6f6c02242c272171e28dd6dfec2fcf7a1c
Ensure index cache entry written in test

Now that index cache files are written in the background, one test in
index-cache.exp is racy -- it assumes that the cache file will have
been written during startup.

This patch fixes the problem by introducing a new maintenance command
to wait for all pending writes to the index cache.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
gdb/NEWS
gdb/doc/gdb.texinfo
gdb/dwarf2/cooked-index.c
gdb/testsuite/gdb.base/index-cache.exp