mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 01:50:24 +08:00
gdb/dwarf: add some QUIT macros
While testing the fix for PR 29105, I noticed I couldn't ctrl-C my way out of GDB expanding many symtabs. GDB was busy in a loop in cooked_index_functions::expand_symtabs_matching. Add a QUIT there. I also happened to see a spot in cooked_index_functions::expand_matching_symbols where a QUIT would be useful too, since we iterate over a potentially big number of index entries and expand CUs in the loop. Add one there too. Change-Id: Ie1d650381df7f944c16d841b3e592d2dce7306c3 Approved-By: Kevin Buettner <kevinb@redhat.com>
This commit is contained in:
@ -18653,6 +18653,8 @@ cooked_index_functions::expand_matching_symbols
|
|||||||
(per_objfile->per_bfd->index_table.get ()));
|
(per_objfile->per_bfd->index_table.get ()));
|
||||||
for (const cooked_index_entry *entry : table->all_entries ())
|
for (const cooked_index_entry *entry : table->all_entries ())
|
||||||
{
|
{
|
||||||
|
QUIT;
|
||||||
|
|
||||||
if (entry->parent_entry != nullptr)
|
if (entry->parent_entry != nullptr)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -18728,6 +18730,8 @@ cooked_index_functions::expand_symtabs_matching
|
|||||||
for (const cooked_index_entry *entry : table->find (name_vec.back (),
|
for (const cooked_index_entry *entry : table->find (name_vec.back (),
|
||||||
completing))
|
completing))
|
||||||
{
|
{
|
||||||
|
QUIT;
|
||||||
|
|
||||||
/* No need to consider symbols from expanded CUs. */
|
/* No need to consider symbols from expanded CUs. */
|
||||||
if (per_objfile->symtab_set_p (entry->per_cu))
|
if (per_objfile->symtab_set_p (entry->per_cu))
|
||||||
continue;
|
continue;
|
||||||
|
Reference in New Issue
Block a user