* [PATCH] gdb/dwarf: add some QUIT macros
@ 2022-12-01 16:01 Simon Marchi
2022-12-01 16:27 ` Kevin Buettner
0 siblings, 1 reply; 3+ messages in thread
From: Simon Marchi @ 2022-12-01 16:01 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
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
---
gdb/dwarf2/read.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 87c0914d8395..dd7fea400275 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -18653,6 +18653,8 @@ cooked_index_functions::expand_matching_symbols
(per_objfile->per_bfd->index_table.get ()));
for (const cooked_index_entry *entry : table->all_entries ())
{
+ QUIT;
+
if (entry->parent_entry != nullptr)
continue;
@@ -18728,6 +18730,8 @@ cooked_index_functions::expand_symtabs_matching
for (const cooked_index_entry *entry : table->find (name_vec.back (),
completing))
{
+ QUIT;
+
/* No need to consider symbols from expanded CUs. */
if (per_objfile->symtab_set_p (entry->per_cu))
continue;
--
2.38.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gdb/dwarf: add some QUIT macros
2022-12-01 16:01 [PATCH] gdb/dwarf: add some QUIT macros Simon Marchi
@ 2022-12-01 16:27 ` Kevin Buettner
2022-12-01 16:44 ` Simon Marchi
0 siblings, 1 reply; 3+ messages in thread
From: Kevin Buettner @ 2022-12-01 16:27 UTC (permalink / raw)
To: Simon Marchi via Gdb-patches; +Cc: Simon Marchi
On Thu, 1 Dec 2022 11:01:44 -0500
Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> wrote:
> 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.
LGTM.
Kevin
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gdb/dwarf: add some QUIT macros
2022-12-01 16:27 ` Kevin Buettner
@ 2022-12-01 16:44 ` Simon Marchi
0 siblings, 0 replies; 3+ messages in thread
From: Simon Marchi @ 2022-12-01 16:44 UTC (permalink / raw)
To: Kevin Buettner, Simon Marchi via Gdb-patches; +Cc: Simon Marchi
On 12/1/22 11:27, Kevin Buettner via Gdb-patches wrote:
> On Thu, 1 Dec 2022 11:01:44 -0500
> Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> wrote:
>
>> 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.
>
> LGTM.
>
> Kevin
>
Thanks, pushed!
Simon
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-12-01 16:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-01 16:01 [PATCH] gdb/dwarf: add some QUIT macros Simon Marchi
2022-12-01 16:27 ` Kevin Buettner
2022-12-01 16:44 ` Simon Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).