Document quick_symbol_functions::expand_symtabs_matching invariant
authorTom Tromey <tom@tromey.com>
Mon, 21 Jun 2021 20:10:41 +0000 (14:10 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 16 Jul 2021 19:54:01 +0000 (13:54 -0600)
commit4f348ca808af86c9698ef11595832018103f9492
tree6fb82f3c099c1cdf2227986cd8da2f74a586113b
parentcc9d6997a5b23d0c8e1960f6c0b5f5cdf456d4e9
Document quick_symbol_functions::expand_symtabs_matching invariant

While working on my series to replace the DWARF psymbol reader, I
noticed that the expand_symtabs_matching has an undocumented
invariant.  I think that, if this invariant is not followed, then GDB
will crash.  So, this patch documents this in the relevant spots and
introduces some asserts to make it clear.

Regression tested on x86-64 Fedora 32.
gdb/dwarf2/read.c
gdb/psymtab.c
gdb/quick-symbol.h
gdb/symfile-debug.c