[PATCH v2 6/6] [gdb/testsuite] Extend gdb.base/index-cache.exp
Tom Tromey
tom@tromey.com
Wed Aug 2 19:41:16 GMT 2023
>>>>> "Tom" == Tom de Vries via Gdb-patches <gdb-patches@sourceware.org> writes:
Tom> The test-case gdb.base/index-cache.exp uses only one source file, which
Tom> contains main.
Tom> While doing "file $exec", in set_initial_language a symbol lookup of "main" is
Tom> done, causing the symtab containing main to be expanded.
Tom> Handling of main is special, and a future optimization may skip the lookup and
Tom> expansion.
Tom> Reliably exercise:
Tom> - the lookup of main, expanding the symtab containing main, by doing
Tom> "ptype main", and
Tom> - the lookup of another symbol, expanding a symtab not containing main, by:
Tom> - adding another source file containing function foo, and
Tom> - doing "ptype foo".
Thanks.
Approved-By: Tom Tromey <tom@tromey.com>
Tom> This triggered a segfault with target board native-extended-gdbserver, filed
Tom> as PR symtab/30712, but that seems to be fixed by a previous commit in this
Tom> series.
I guess something here needs needs a "Bug:" trailer, it's fine by me if
it is this patch.
Tom
More information about the Gdb-patches
mailing list