public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] dwarf2read.c (dw2_expand_symtabs_matching): Add some QUIT calls.
@ 2015-03-30 23:29 Doug Evans
  2015-04-15 20:27 ` Doug Evans
  0 siblings, 1 reply; 3+ messages in thread
From: Doug Evans @ 2015-03-30 23:29 UTC (permalink / raw)
  To: gdb-patches

Hi.

"info fun foo" can be a pain when it's not interruptable,
especially if you're not exactly sure of what you're looking for
and provide something that matches too much.

2015-03-30  Doug Evans  <dje@google.com>

	* dwarf2read.c (dw2_expand_symtabs_matching): Add some QUIT calls.

diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index f6b0c01..b91fbf5 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -3875,6 +3875,8 @@ dw2_expand_symtabs_matching
 	  struct quick_file_names *file_data;
 	  void **slot;
 
+	  QUIT;
+
 	  per_cu->v.quick->mark = 0;
 
 	  /* We only need to look at symtabs not already expanded.  */
@@ -3935,6 +3937,8 @@ dw2_expand_symtabs_matching
       offset_type *vec, vec_len, vec_idx;
       int global_seen = 0;
 
+      QUIT;
+
       if (index->symbol_table[idx] == 0 && index->symbol_table[idx + 1] == 0)
 	continue;
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] dwarf2read.c (dw2_expand_symtabs_matching): Add some QUIT calls.
  2015-03-30 23:29 [PATCH] dwarf2read.c (dw2_expand_symtabs_matching): Add some QUIT calls Doug Evans
@ 2015-04-15 20:27 ` Doug Evans
  2015-04-15 21:35   ` Doug Evans
  0 siblings, 1 reply; 3+ messages in thread
From: Doug Evans @ 2015-04-15 20:27 UTC (permalink / raw)
  To: gdb-patches

Doug Evans writes:
 > Hi.
 > 
 > "info fun foo" can be a pain when it's not interruptable,
 > especially if you're not exactly sure of what you're looking for
 > and provide something that matches too much.
 > 
 > 2015-03-30  Doug Evans  <dje@google.com>
 > 
 > 	* dwarf2read.c (dw2_expand_symtabs_matching): Add some QUIT calls.

Committed.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] dwarf2read.c (dw2_expand_symtabs_matching): Add some QUIT calls.
  2015-04-15 20:27 ` Doug Evans
@ 2015-04-15 21:35   ` Doug Evans
  0 siblings, 0 replies; 3+ messages in thread
From: Doug Evans @ 2015-04-15 21:35 UTC (permalink / raw)
  To: gdb-patches

Doug Evans writes:
 > Doug Evans writes:
 >  > Hi.
 >  > 
 >  > "info fun foo" can be a pain when it's not interruptable,
 >  > especially if you're not exactly sure of what you're looking for
 >  > and provide something that matches too much.
 >  > 
 >  > 2015-03-30  Doug Evans  <dje@google.com>
 >  > 
 >  > 	* dwarf2read.c (dw2_expand_symtabs_matching): Add some QUIT calls.
 > 
 > Committed.

Hi.

I committed this corresponding patch.

There is a call to QUIT in recursively_search_psymtabs,
but I like the added symmetry and robustness.

[The astute reader may find that there are already QUIT calls
that can catch ^c's in this case.
E.g., dwarf2read.c calls out to c_print_type (IIRC)
which has a call to QUIT within it. However, there is a problem here
which I still have to address: these QUIT calls can leave symbol tables
partially constructed. Not sure how to fix this yet (I can think of
a couple of ways), and at any rate I like the explicit QUIT calls
that these two patches add.]

2015-04-15  Doug Evans  <dje@google.com>

	* psymtab.c (psym_expand_symtabs_matching): Add QUIT call.

diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index b3c2f44..383e4c4 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -1423,6 +1423,8 @@ psym_expand_symtabs_matching
 
   ALL_OBJFILE_PSYMTABS_REQUIRED (objfile, ps)
     {
+      QUIT;
+
       if (ps->readin)
 	continue;
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-15 21:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-30 23:29 [PATCH] dwarf2read.c (dw2_expand_symtabs_matching): Add some QUIT calls Doug Evans
2015-04-15 20:27 ` Doug Evans
2015-04-15 21:35   ` Doug Evans

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).