This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Improve interruptability of symbol lookup
- From: Doug Evans <dje at google dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 15 May 2015 23:43:30 +0000
- Subject: [PATCH] Improve interruptability of symbol lookup
- Authentication-results: sourceware.org; auth=none
Hi.
This patch improves the interruptability of commands that do
symbol lookup when many objfiles are involved (think 1000s).
2015-05-15 Doug Evans <dje@google.com>
* objfiles.c (default_iterate_over_objfiles_in_search_order): Add
QUIT call.
* symtab.c (lookup_static_symbol): Ditto.
(basic_lookup_transparent_type): Ditto.
* windows-tdep.c (windows_iterate_over_objfiles_in_search_order):
Ditto.
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index c6f9f00..f6023ad 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -1487,9 +1487,11 @@ default_iterate_over_objfiles_in_search_order
ALL_OBJFILES (objfile)
{
- stop = cb (objfile, cb_data);
- if (stop)
- return;
+ QUIT;
+
+ stop = cb (objfile, cb_data);
+ if (stop)
+ return;
}
}
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 72df872..dbb7221 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -2652,6 +2656,8 @@ lookup_static_symbol (const char *name, const
domain_enum domain)
ALL_OBJFILES (objfile)
{
+ QUIT;
+
result = lookup_symbol_in_objfile (objfile, STATIC_BLOCK, name,
domain);
if (result != NULL)
{
@@ -2837,6 +2843,8 @@ basic_lookup_transparent_type (const char *name)
ALL_OBJFILES (objfile)
{
+ QUIT;
+
ALL_OBJFILE_COMPUNITS (objfile, cust)
{
bv = COMPUNIT_BLOCKVECTOR (cust);
@@ -2851,6 +2859,8 @@ basic_lookup_transparent_type (const char *name)
ALL_OBJFILES (objfile)
{
+ QUIT;
+
t = basic_lookup_transparent_type_quick (objfile, GLOBAL_BLOCK, name);
if (t)
return t;
@@ -2865,6 +2875,8 @@ basic_lookup_transparent_type (const char *name)
ALL_OBJFILES (objfile)
{
+ QUIT;
+
ALL_OBJFILE_COMPUNITS (objfile, cust)
{
bv = COMPUNIT_BLOCKVECTOR (cust);
@@ -2879,6 +2891,8 @@ basic_lookup_transparent_type (const char *name)
ALL_OBJFILES (objfile)
{
+ QUIT;
+
t = basic_lookup_transparent_type_quick (objfile, STATIC_BLOCK, name);
if (t)
return t;
diff --git a/gdb/windows-tdep.c b/gdb/windows-tdep.c
index dc4e2e4..49460f2 100644
--- a/gdb/windows-tdep.c
+++ b/gdb/windows-tdep.c
@@ -448,6 +448,8 @@ windows_iterate_over_objfiles_in_search_order
ALL_OBJFILES (objfile)
{
+ QUIT;
+
if (objfile != current_objfile)
{
stop = cb (objfile, cb_data);