gdb: remove symtab::blockvector

symtab::blockvector is a wrapper around compunit_symtab::blockvector.
It is a bit misleadnig, as it gives the impression that a symtab has a
blockvector.  Remove it, change all users to fetch the blockvector
through the compunit instead.

Change-Id: Ibd062cd7926112a60d52899dff9224591cbdeebf
This commit is contained in:
Simon Marchi
2022-04-06 10:42:03 -04:00
parent e473032828
commit 44281e6c08
14 changed files with 33 additions and 36 deletions

View File

@@ -1188,12 +1188,11 @@ iterate_over_all_matching_symtabs
{
const struct block *block;
int i;
const blockvector *bv = symtab->compunit ()->blockvector ();
for (i = FIRST_LOCAL_BLOCK;
i < BLOCKVECTOR_NBLOCKS (symtab->blockvector ());
i++)
for (i = FIRST_LOCAL_BLOCK; i < BLOCKVECTOR_NBLOCKS (bv); i++)
{
block = BLOCKVECTOR_BLOCK (symtab->blockvector (), i);
block = BLOCKVECTOR_BLOCK (bv, i);
state->language->iterate_over_symbols
(block, lookup_name, name_domain,
[&] (block_symbol *bsym)
@@ -1232,7 +1231,8 @@ iterate_over_file_blocks
{
const struct block *block;
for (block = BLOCKVECTOR_BLOCK (symtab->blockvector (), STATIC_BLOCK);
for (block = BLOCKVECTOR_BLOCK (symtab->compunit ()->blockvector (),
STATIC_BLOCK);
block != NULL;
block = BLOCK_SUPERBLOCK (block))
current_language->iterate_over_symbols (block, name, domain, callback);