forked from Imagelibrary/binutils-gdb
Remove lookup_objfile_from_block
lookup_objfile_from_block mostly duplicates the functionality of block_objfile, but in a less efficient way. This patch removes this function and changes the callers to use block_objfile instead. Tested by the buildbot. gdb/ChangeLog 2020-05-15 Tom Tromey <tom@tromey.com> * symtab.c (lookup_language_this, lookup_symbol_aux): Use block_objfile. (lookup_objfile_from_block): Remove. (lookup_symbol_in_block, lookup_symbol_in_static_block) (lookup_global_symbol): Use block_objfile. * symtab.h (lookup_objfile_from_block): Don't declare. * printcmd.c (clear_dangling_display_expressions): Use block_objfile. * parse.c (operator_check_standard): Use block_objfile.
This commit is contained in:
@@ -2128,12 +2128,20 @@ clear_dangling_display_expressions (struct objfile *objfile)
|
||||
if (d->pspace != pspace)
|
||||
continue;
|
||||
|
||||
if (lookup_objfile_from_block (d->block) == objfile
|
||||
struct objfile *bl_objf = nullptr;
|
||||
if (d->block != nullptr)
|
||||
{
|
||||
bl_objf = block_objfile (d->block);
|
||||
if (bl_objf->separate_debug_objfile_backlink != nullptr)
|
||||
bl_objf = bl_objf->separate_debug_objfile_backlink;
|
||||
}
|
||||
|
||||
if (bl_objf == objfile
|
||||
|| (d->exp != NULL && exp_uses_objfile (d->exp.get (), objfile)))
|
||||
{
|
||||
d->exp.reset ();
|
||||
d->block = NULL;
|
||||
}
|
||||
{
|
||||
d->exp.reset ();
|
||||
d->block = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user