Index files are not used in the session where they were created

Dmitry Neverov via Gdb <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CAEY59_KmafbXkjSVk1kp-dFxp6RA3Srs2aUPu6a-euXtbM-Buw@mail.gmail.com>
I'm investigating whether index-caches help with slow symbols
loading (https://sourceware.org/bugzilla/show_bug.cgi?id=30520).

They seem to help, but only on the second gdb run. When I start a
debug session for the first time with an empty ~/.caches/gdb
directory, I can see from logs that gdb tries to read index
files, fails because they don't exist, and then writes index to
disk. The index is saved in a few seconds.

If I then try loading children of a variable causing a slow symbol
lookup, the lookup is still slow. Even though the index is ready
and is saved to disk.

If I restart gdb after the index is written, then gdb picks it
up, and symbol loading is much faster - a few seconds instead of
a minute.

Is there a way to use the created index without gdb restart?

-- 
Dmitrii Neverov
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.