gdb: remove BLOCKVECTOR_BLOCK and BLOCKVECTOR_NBLOCKS macros
Replace with calls to blockvector::blocks, and the appropriate method call on the returned array_view. Change-Id: I04d1f39603e4d4c21c96822421431d9a029d8ddd
This commit is contained in:
parent
6395b62847
commit
63d609debb
25 changed files with 194 additions and 161 deletions
23
gdb/symtab.c
23
gdb/symtab.c
|
@ -2327,7 +2327,7 @@ lookup_symbol_in_objfile_symtabs (struct objfile *objfile,
|
|||
struct block_symbol result;
|
||||
|
||||
bv = cust->blockvector ();
|
||||
block = BLOCKVECTOR_BLOCK (bv, block_index);
|
||||
block = bv->block (block_index);
|
||||
result.symbol = block_lookup_symbol_primary (block, name, domain);
|
||||
result.block = block;
|
||||
if (result.symbol == NULL)
|
||||
|
@ -2460,7 +2460,7 @@ lookup_symbol_via_quick_fns (struct objfile *objfile,
|
|||
}
|
||||
|
||||
bv = cust->blockvector ();
|
||||
block = BLOCKVECTOR_BLOCK (bv, block_index);
|
||||
block = bv->block (block_index);
|
||||
result.symbol = block_lookup_symbol (block, name,
|
||||
symbol_name_match_type::FULL, domain);
|
||||
if (result.symbol == NULL)
|
||||
|
@ -2810,7 +2810,7 @@ basic_lookup_transparent_type_quick (struct objfile *objfile,
|
|||
return NULL;
|
||||
|
||||
bv = cust->blockvector ();
|
||||
block = BLOCKVECTOR_BLOCK (bv, block_index);
|
||||
block = bv->block (block_index);
|
||||
sym = block_find_symbol (block, name, STRUCT_DOMAIN,
|
||||
block_find_non_opaque_type, NULL);
|
||||
if (sym == NULL)
|
||||
|
@ -2835,7 +2835,7 @@ basic_lookup_transparent_type_1 (struct objfile *objfile,
|
|||
for (compunit_symtab *cust : objfile->compunits ())
|
||||
{
|
||||
bv = cust->blockvector ();
|
||||
block = BLOCKVECTOR_BLOCK (bv, block_index);
|
||||
block = bv->block (block_index);
|
||||
sym = block_find_symbol (block, name, STRUCT_DOMAIN,
|
||||
block_find_non_opaque_type, NULL);
|
||||
if (sym != NULL)
|
||||
|
@ -2980,8 +2980,7 @@ find_pc_sect_compunit_symtab (CORE_ADDR pc, struct obj_section *section)
|
|||
for (compunit_symtab *cust : obj_file->compunits ())
|
||||
{
|
||||
const struct blockvector *bv = cust->blockvector ();
|
||||
const struct block *global_block
|
||||
= BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
|
||||
const struct block *global_block = bv->global_block ();
|
||||
CORE_ADDR start = global_block->start ();
|
||||
CORE_ADDR end = global_block->end ();
|
||||
bool in_range_p = start <= pc && pc < end;
|
||||
|
@ -3030,7 +3029,7 @@ find_pc_sect_compunit_symtab (CORE_ADDR pc, struct obj_section *section)
|
|||
b_index <= STATIC_BLOCK && sym == NULL;
|
||||
++b_index)
|
||||
{
|
||||
const struct block *b = BLOCKVECTOR_BLOCK (bv, b_index);
|
||||
const struct block *b = bv->block (b_index);
|
||||
ALL_BLOCK_SYMBOLS (b, iter, sym)
|
||||
{
|
||||
fixup_symbol_section (sym, obj_file);
|
||||
|
@ -3089,7 +3088,7 @@ find_symbol_at_address (CORE_ADDR address)
|
|||
|
||||
for (int i = GLOBAL_BLOCK; i <= STATIC_BLOCK; ++i)
|
||||
{
|
||||
const struct block *b = BLOCKVECTOR_BLOCK (bv, i);
|
||||
const struct block *b = bv->block (i);
|
||||
struct block_iterator iter;
|
||||
struct symbol *sym;
|
||||
|
||||
|
@ -3406,7 +3405,7 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
|
|||
else if (alt)
|
||||
val.end = alt->pc;
|
||||
else
|
||||
val.end = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK)->end ();
|
||||
val.end = bv->global_block ()->end ();
|
||||
}
|
||||
val.section = section;
|
||||
return val;
|
||||
|
@ -4869,7 +4868,7 @@ global_symbol_searcher::add_matching_symbols
|
|||
{
|
||||
struct block_iterator iter;
|
||||
struct symbol *sym;
|
||||
const struct block *b = BLOCKVECTOR_BLOCK (bv, block);
|
||||
const struct block *b = bv->block (block);
|
||||
|
||||
ALL_BLOCK_SYMBOLS (b, iter, sym)
|
||||
{
|
||||
|
@ -5832,7 +5831,6 @@ add_symtab_completions (struct compunit_symtab *cust,
|
|||
enum type_code code)
|
||||
{
|
||||
struct symbol *sym;
|
||||
const struct block *b;
|
||||
struct block_iterator iter;
|
||||
int i;
|
||||
|
||||
|
@ -5842,7 +5840,8 @@ add_symtab_completions (struct compunit_symtab *cust,
|
|||
for (i = GLOBAL_BLOCK; i <= STATIC_BLOCK; i++)
|
||||
{
|
||||
QUIT;
|
||||
b = BLOCKVECTOR_BLOCK (cust->blockvector (), i);
|
||||
|
||||
const struct block *b = cust->blockvector ()->block (i);
|
||||
ALL_BLOCK_SYMBOLS (b, iter, sym)
|
||||
{
|
||||
if (completion_skip_symbol (mode, sym))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue