Improve interruptability of symbol lookup
Commit Message
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.
@@ -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;
}
}
@@ -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;
@@ -448,6 +448,8 @@ windows_iterate_over_objfiles_in_search_order
ALL_OBJFILES (objfile)
{
+ QUIT;
+
if (objfile != current_objfile)
{
stop = cb (objfile, cb_data);