symtab.h (SYMTAB_BLOCKVECTOR): Renamed from BLOCKVECTOR. All uses updated.

gdb/ChangeLog:

	* symtab.h (SYMTAB_BLOCKVECTOR): Renamed from BLOCKVECTOR.  All uses
	updated.
This commit is contained in:
Doug Evans 2014-11-18 09:41:45 -08:00
parent 4d663531f2
commit 439247b656
22 changed files with 76 additions and 62 deletions

View file

@ -1,3 +1,8 @@
2014-11-18 Doug Evans <xdje42@gmail.com>
* symtab.h (SYMTAB_BLOCKVECTOR): Renamed from BLOCKVECTOR. All uses
updated.
2014-11-18 Doug Evans <xdje42@gmail.com> 2014-11-18 Doug Evans <xdje42@gmail.com>
* buildsym.c (buildsym_objfile): New static global. * buildsym.c (buildsym_objfile): New static global.

View file

@ -1033,7 +1033,7 @@ block_lookup (const struct block *context, const char *raw_name)
symtab = NULL; symtab = NULL;
if (symtab != NULL) if (symtab != NULL)
return BLOCKVECTOR_BLOCK (BLOCKVECTOR (symtab), STATIC_BLOCK); return BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (symtab), STATIC_BLOCK);
else if (nsyms == 0 || SYMBOL_CLASS (syms[0].sym) != LOC_BLOCK) else if (nsyms == 0 || SYMBOL_CLASS (syms[0].sym) != LOC_BLOCK)
{ {
if (context == NULL) if (context == NULL)

View file

@ -4455,8 +4455,10 @@ cache_symbol (const char *name, domain_enum namespace, struct symbol *sym,
the symbol is local or not, we check the block where we found it the symbol is local or not, we check the block where we found it
against the global and static blocks of its associated symtab. */ against the global and static blocks of its associated symtab. */
if (sym if (sym
&& BLOCKVECTOR_BLOCK (BLOCKVECTOR (sym->symtab), GLOBAL_BLOCK) != block && BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (sym->symtab),
&& BLOCKVECTOR_BLOCK (BLOCKVECTOR (sym->symtab), STATIC_BLOCK) != block) GLOBAL_BLOCK) != block
&& BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (sym->symtab),
STATIC_BLOCK) != block)
return; return;
h = msymbol_hash (name) % HASH_SIZE; h = msymbol_hash (name) % HASH_SIZE;
@ -6219,7 +6221,7 @@ ada_make_symbol_completion_list (const char *text0, const char *word,
ALL_PRIMARY_SYMTABS (objfile, s) ALL_PRIMARY_SYMTABS (objfile, s)
{ {
QUIT; QUIT;
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK); b = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (s), GLOBAL_BLOCK);
ALL_BLOCK_SYMBOLS (b, iter, sym) ALL_BLOCK_SYMBOLS (b, iter, sym)
{ {
symbol_completion_add (&completions, SYMBOL_LINKAGE_NAME (sym), symbol_completion_add (&completions, SYMBOL_LINKAGE_NAME (sym),
@ -6231,7 +6233,7 @@ ada_make_symbol_completion_list (const char *text0, const char *word,
ALL_PRIMARY_SYMTABS (objfile, s) ALL_PRIMARY_SYMTABS (objfile, s)
{ {
QUIT; QUIT;
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK); b = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (s), STATIC_BLOCK);
/* Don't do this block twice. */ /* Don't do this block twice. */
if (b == surrounding_static_block) if (b == surrounding_static_block)
continue; continue;
@ -12846,7 +12848,7 @@ ada_add_global_exceptions (regex_t *preg, VEC(ada_exc_info) **exceptions)
ALL_PRIMARY_SYMTABS (objfile, s) ALL_PRIMARY_SYMTABS (objfile, s)
{ {
const struct blockvector *bv = BLOCKVECTOR (s); const struct blockvector *bv = SYMTAB_BLOCKVECTOR (s);
int i; int i;
for (i = GLOBAL_BLOCK; i <= STATIC_BLOCK; i++) for (i = GLOBAL_BLOCK; i <= STATIC_BLOCK; i++)

View file

@ -169,7 +169,7 @@ blockvector_for_pc_sect (CORE_ADDR pc, struct obj_section *section,
return 0; return 0;
} }
bl = BLOCKVECTOR (symtab); bl = SYMTAB_BLOCKVECTOR (symtab);
/* Then search that symtab for the smallest block that wins. */ /* Then search that symtab for the smallest block that wins. */
b = find_block_in_blockvector (bl, pc); b = find_block_in_blockvector (bl, pc);
@ -504,7 +504,8 @@ block_iterator_step (struct block_iterator *iterator, int first)
if (symtab == NULL) if (symtab == NULL)
return NULL; return NULL;
block = BLOCKVECTOR_BLOCK (BLOCKVECTOR (symtab), iterator->which); block = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (symtab),
iterator->which);
sym = dict_iterator_first (BLOCK_DICT (block), &iterator->dict_iter); sym = dict_iterator_first (BLOCK_DICT (block), &iterator->dict_iter);
} }
else else
@ -569,7 +570,8 @@ block_iter_name_step (struct block_iterator *iterator, const char *name,
if (symtab == NULL) if (symtab == NULL)
return NULL; return NULL;
block = BLOCKVECTOR_BLOCK (BLOCKVECTOR (symtab), iterator->which); block = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (symtab),
iterator->which);
sym = dict_iter_name_first (BLOCK_DICT (block), name, sym = dict_iter_name_first (BLOCK_DICT (block), name,
&iterator->dict_iter); &iterator->dict_iter);
} }
@ -638,7 +640,8 @@ block_iter_match_step (struct block_iterator *iterator,
if (symtab == NULL) if (symtab == NULL)
return NULL; return NULL;
block = BLOCKVECTOR_BLOCK (BLOCKVECTOR (symtab), iterator->which); block = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (symtab),
iterator->which);
sym = dict_iter_match_first (BLOCK_DICT (block), name, sym = dict_iter_match_first (BLOCK_DICT (block), name,
compare, &iterator->dict_iter); compare, &iterator->dict_iter);
} }

View file

@ -2928,7 +2928,7 @@ classify_name (struct parser_state *par_state, const struct block *block,
symtab = lookup_symtab (copy); symtab = lookup_symtab (copy);
if (symtab) if (symtab)
{ {
yylval.bval = BLOCKVECTOR_BLOCK (BLOCKVECTOR (symtab), yylval.bval = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (symtab),
STATIC_BLOCK); STATIC_BLOCK);
return FILENAME; return FILENAME;
} }

View file

@ -1544,7 +1544,7 @@ patch_opaque_types (struct symtab *s)
struct symbol *real_sym; struct symbol *real_sym;
/* Go through the per-file symbols only. */ /* Go through the per-file symbols only. */
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK); b = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (s), STATIC_BLOCK);
ALL_BLOCK_SYMBOLS (b, iter, real_sym) ALL_BLOCK_SYMBOLS (b, iter, real_sym)
{ {
/* Find completed typedefs to use to fix opaque ones. /* Find completed typedefs to use to fix opaque ones.

View file

@ -1420,14 +1420,14 @@ make_symbol_overload_list_qualified (const char *func_name)
ALL_PRIMARY_SYMTABS (objfile, s) ALL_PRIMARY_SYMTABS (objfile, s)
{ {
QUIT; QUIT;
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK); b = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (s), GLOBAL_BLOCK);
make_symbol_overload_list_block (func_name, b); make_symbol_overload_list_block (func_name, b);
} }
ALL_PRIMARY_SYMTABS (objfile, s) ALL_PRIMARY_SYMTABS (objfile, s)
{ {
QUIT; QUIT;
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK); b = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (s), STATIC_BLOCK);
/* Don't do this block twice. */ /* Don't do this block twice. */
if (b == surrounding_static_block) if (b == surrounding_static_block)
continue; continue;

View file

@ -3615,7 +3615,7 @@ dw2_lookup_symbol (struct objfile *objfile, int block_index,
{ {
struct symbol *sym = NULL; struct symbol *sym = NULL;
struct symtab *stab = dw2_instantiate_symtab (per_cu); struct symtab *stab = dw2_instantiate_symtab (per_cu);
const struct blockvector *bv = BLOCKVECTOR (stab); const struct blockvector *bv = SYMTAB_BLOCKVECTOR (stab);
struct block *block = BLOCKVECTOR_BLOCK (bv, block_index); struct block *block = BLOCKVECTOR_BLOCK (bv, block_index);
/* Some caution must be observed with overloaded functions /* Some caution must be observed with overloaded functions
@ -3970,8 +3970,8 @@ recursively_find_pc_sect_symtab (struct symtab *symtab, CORE_ADDR pc)
{ {
int i; int i;
if (BLOCKVECTOR (symtab) != NULL if (SYMTAB_BLOCKVECTOR (symtab) != NULL
&& blockvector_contains_pc (BLOCKVECTOR (symtab), pc)) && blockvector_contains_pc (SYMTAB_BLOCKVECTOR (symtab), pc))
return symtab; return symtab;
if (symtab->includes == NULL) if (symtab->includes == NULL)

View file

@ -363,7 +363,7 @@ gdbscm_symtab_global_block (SCM self)
const struct blockvector *blockvector; const struct blockvector *blockvector;
const struct block *block; const struct block *block;
blockvector = BLOCKVECTOR (symtab); blockvector = SYMTAB_BLOCKVECTOR (symtab);
block = BLOCKVECTOR_BLOCK (blockvector, GLOBAL_BLOCK); block = BLOCKVECTOR_BLOCK (blockvector, GLOBAL_BLOCK);
return bkscm_scm_from_block (block, SYMTAB_OBJFILE (symtab)); return bkscm_scm_from_block (block, SYMTAB_OBJFILE (symtab));
@ -381,7 +381,7 @@ gdbscm_symtab_static_block (SCM self)
const struct blockvector *blockvector; const struct blockvector *blockvector;
const struct block *block; const struct block *block;
blockvector = BLOCKVECTOR (symtab); blockvector = SYMTAB_BLOCKVECTOR (symtab);
block = BLOCKVECTOR_BLOCK (blockvector, STATIC_BLOCK); block = BLOCKVECTOR_BLOCK (blockvector, STATIC_BLOCK);
return bkscm_scm_from_block (block, SYMTAB_OBJFILE (symtab)); return bkscm_scm_from_block (block, SYMTAB_OBJFILE (symtab));

View file

@ -147,7 +147,7 @@ get_java_class_symtab (struct gdbarch *gdbarch)
obstack_alloc (&objfile->objfile_obstack, obstack_alloc (&objfile->objfile_obstack,
sizeof (struct blockvector) + sizeof (struct block *)); sizeof (struct blockvector) + sizeof (struct block *));
BLOCKVECTOR_NBLOCKS (bv) = 1; BLOCKVECTOR_NBLOCKS (bv) = 1;
BLOCKVECTOR (class_symtab) = bv; SYMTAB_BLOCKVECTOR (class_symtab) = bv;
/* Allocate dummy STATIC_BLOCK. */ /* Allocate dummy STATIC_BLOCK. */
bl = allocate_block (&objfile->objfile_obstack); bl = allocate_block (&objfile->objfile_obstack);
@ -173,7 +173,7 @@ add_class_symtab_symbol (struct symbol *sym)
{ {
struct symtab *symtab struct symtab *symtab
= get_java_class_symtab (get_objfile_arch (SYMBOL_OBJFILE (sym))); = get_java_class_symtab (get_objfile_arch (SYMBOL_OBJFILE (sym)));
const struct blockvector *bv = BLOCKVECTOR (symtab); const struct blockvector *bv = SYMTAB_BLOCKVECTOR (symtab);
dict_add_symbol (BLOCK_DICT (BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK)), sym); dict_add_symbol (BLOCK_DICT (BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK)), sym);
} }

View file

@ -1042,9 +1042,10 @@ iterate_over_all_matching_symtabs (struct linespec_state *state,
int i; int i;
for (i = FIRST_LOCAL_BLOCK; for (i = FIRST_LOCAL_BLOCK;
i < BLOCKVECTOR_NBLOCKS (BLOCKVECTOR (symtab)); i++) i < BLOCKVECTOR_NBLOCKS (SYMTAB_BLOCKVECTOR (symtab));
i++)
{ {
block = BLOCKVECTOR_BLOCK (BLOCKVECTOR (symtab), i); block = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (symtab), i);
state->language->la_iterate_over_symbols state->language->la_iterate_over_symbols
(block, name, domain, iterate_inline_only, &cad); (block, name, domain, iterate_inline_only, &cad);
} }
@ -1081,7 +1082,7 @@ iterate_over_file_blocks (struct symtab *symtab,
{ {
struct block *block; struct block *block;
for (block = BLOCKVECTOR_BLOCK (BLOCKVECTOR (symtab), STATIC_BLOCK); for (block = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (symtab), STATIC_BLOCK);
block != NULL; block != NULL;
block = BLOCK_SUPERBLOCK (block)) block = BLOCK_SUPERBLOCK (block))
LA_ITERATE_OVER_SYMBOLS (block, name, domain, callback, data); LA_ITERATE_OVER_SYMBOLS (block, name, domain, callback, data);

View file

@ -841,7 +841,7 @@ count_symtabs_and_blocks (int *nr_symtabs_ptr, int *nr_primary_symtabs_ptr,
if (s->primary) if (s->primary)
{ {
++nr_primary_symtabs; ++nr_primary_symtabs;
nr_blocks += BLOCKVECTOR_NBLOCKS (BLOCKVECTOR (s)); nr_blocks += BLOCKVECTOR_NBLOCKS (SYMTAB_BLOCKVECTOR (s));
} }
} }
} }

View file

@ -601,7 +601,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
case stGlobal: /* External symbol, goes into global block. */ case stGlobal: /* External symbol, goes into global block. */
class = LOC_STATIC; class = LOC_STATIC;
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (top_stack->cur_st), b = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (top_stack->cur_st),
GLOBAL_BLOCK); GLOBAL_BLOCK);
s = new_symbol (name); s = new_symbol (name);
SYMBOL_VALUE_ADDRESS (s) = (CORE_ADDR) sh->value; SYMBOL_VALUE_ADDRESS (s) = (CORE_ADDR) sh->value;
@ -754,7 +754,8 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
b = top_stack->cur_block; b = top_stack->cur_block;
if (sh->st == stProc) if (sh->st == stProc)
{ {
const struct blockvector *bv = BLOCKVECTOR (top_stack->cur_st); const struct blockvector *bv
= SYMTAB_BLOCKVECTOR (top_stack->cur_st);
/* The next test should normally be true, but provides a /* The next test should normally be true, but provides a
hook for nested functions (which we don't want to make hook for nested functions (which we don't want to make
@ -1129,7 +1130,8 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
top_stack->blocktype == stStaticProc)) top_stack->blocktype == stStaticProc))
{ {
/* Finished with procedure */ /* Finished with procedure */
const struct blockvector *bv = BLOCKVECTOR (top_stack->cur_st); const struct blockvector *bv
= SYMTAB_BLOCKVECTOR (top_stack->cur_st);
struct mdebug_extra_func_info *e; struct mdebug_extra_func_info *e;
struct block *b = top_stack->cur_block; struct block *b = top_stack->cur_block;
struct type *ftype = top_stack->cur_type; struct type *ftype = top_stack->cur_type;
@ -1982,7 +1984,7 @@ parse_procedure (PDR *pr, struct symtab *search_symtab,
#else #else
s = mylookup_symbol s = mylookup_symbol
(sh_name, (sh_name,
BLOCKVECTOR_BLOCK (BLOCKVECTOR (search_symtab), STATIC_BLOCK), BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (search_symtab), STATIC_BLOCK),
VAR_DOMAIN, VAR_DOMAIN,
LOC_BLOCK); LOC_BLOCK);
#endif #endif
@ -4194,7 +4196,7 @@ psymtab_to_symtab_1 (struct objfile *objfile,
push_parse_stack (); push_parse_stack ();
top_stack->cur_st = st; top_stack->cur_st = st;
top_stack->cur_block = BLOCKVECTOR_BLOCK (BLOCKVECTOR (st), top_stack->cur_block = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (st),
STATIC_BLOCK); STATIC_BLOCK);
BLOCK_START (top_stack->cur_block) = pst->textlow; BLOCK_START (top_stack->cur_block) = pst->textlow;
BLOCK_END (top_stack->cur_block) = 0; BLOCK_END (top_stack->cur_block) = 0;
@ -4290,7 +4292,7 @@ psymtab_to_symtab_1 (struct objfile *objfile,
FIXME, Maybe quit once we have found the right number of ext's? */ FIXME, Maybe quit once we have found the right number of ext's? */
top_stack->cur_st = st; top_stack->cur_st = st;
top_stack->cur_block top_stack->cur_block
= BLOCKVECTOR_BLOCK (BLOCKVECTOR (top_stack->cur_st), = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (top_stack->cur_st),
GLOBAL_BLOCK); GLOBAL_BLOCK);
top_stack->blocktype = stFile; top_stack->blocktype = stFile;
@ -4605,14 +4607,14 @@ add_block (struct block *b, struct symtab *s)
{ {
/* Cast away "const", but that's ok because we're building the /* Cast away "const", but that's ok because we're building the
symtab and blockvector here. */ symtab and blockvector here. */
struct blockvector *bv = (struct blockvector *) BLOCKVECTOR (s); struct blockvector *bv = (struct blockvector *) SYMTAB_BLOCKVECTOR (s);
bv = (struct blockvector *) xrealloc ((void *) bv, bv = (struct blockvector *) xrealloc ((void *) bv,
(sizeof (struct blockvector) (sizeof (struct blockvector)
+ BLOCKVECTOR_NBLOCKS (bv) + BLOCKVECTOR_NBLOCKS (bv)
* sizeof (bv->block))); * sizeof (bv->block)));
if (bv != BLOCKVECTOR (s)) if (bv != SYMTAB_BLOCKVECTOR (s))
BLOCKVECTOR (s) = bv; SYMTAB_BLOCKVECTOR (s) = bv;
BLOCKVECTOR_BLOCK (bv, BLOCKVECTOR_NBLOCKS (bv)++) = b; BLOCKVECTOR_BLOCK (bv, BLOCKVECTOR_NBLOCKS (bv)++) = b;
} }
@ -4676,7 +4678,7 @@ sort_blocks (struct symtab *s)
{ {
/* We have to cast away const here, but this is ok because we're /* We have to cast away const here, but this is ok because we're
constructing the blockvector in this code. */ constructing the blockvector in this code. */
struct blockvector *bv = (struct blockvector *) BLOCKVECTOR (s); struct blockvector *bv = (struct blockvector *) SYMTAB_BLOCKVECTOR (s);
if (BLOCKVECTOR_NBLOCKS (bv) <= FIRST_LOCAL_BLOCK) if (BLOCKVECTOR_NBLOCKS (bv) <= FIRST_LOCAL_BLOCK)
{ {
@ -4738,7 +4740,7 @@ new_symtab (const char *name, int maxlines, struct objfile *objfile)
BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK) = new_block (NON_FUNCTION_BLOCK); BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK) = new_block (NON_FUNCTION_BLOCK);
BLOCK_SUPERBLOCK (BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK)) = BLOCK_SUPERBLOCK (BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK)) =
BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
BLOCKVECTOR (s) = bv; SYMTAB_BLOCKVECTOR (s) = bv;
s->debugformat = "ECOFF"; s->debugformat = "ECOFF";
return (s); return (s);

View file

@ -760,7 +760,7 @@ objfile_relocate1 (struct objfile *objfile,
if (!s->primary) if (!s->primary)
continue; continue;
bv = BLOCKVECTOR (s); bv = SYMTAB_BLOCKVECTOR (s);
if (BLOCKVECTOR_MAP (bv)) if (BLOCKVECTOR_MAP (bv))
addrmap_relocate (BLOCKVECTOR_MAP (bv), addrmap_relocate (BLOCKVECTOR_MAP (bv),
ANOFFSET (delta, s->block_line_section)); ANOFFSET (delta, s->block_line_section));

View file

@ -675,7 +675,7 @@ block : BLOCKNAME
struct symtab *tem = struct symtab *tem =
lookup_symtab (copy_name ($1.stoken)); lookup_symtab (copy_name ($1.stoken));
if (tem) if (tem)
$$ = BLOCKVECTOR_BLOCK (BLOCKVECTOR (tem), $$ = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (tem),
STATIC_BLOCK); STATIC_BLOCK);
else else
error (_("No file or function \"%s\"."), error (_("No file or function \"%s\"."),

View file

@ -1174,7 +1174,8 @@ parse_exp_in_context_1 (const char **stringptr, CORE_ADDR pc,
struct symtab_and_line cursal = get_current_source_symtab_and_line (); struct symtab_and_line cursal = get_current_source_symtab_and_line ();
if (cursal.symtab) if (cursal.symtab)
expression_context_block expression_context_block
= BLOCKVECTOR_BLOCK (BLOCKVECTOR (cursal.symtab), STATIC_BLOCK); = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (cursal.symtab),
STATIC_BLOCK);
if (expression_context_block) if (expression_context_block)
expression_context_pc = BLOCK_START (expression_context_block); expression_context_pc = BLOCK_START (expression_context_block);
} }

View file

@ -513,7 +513,7 @@ lookup_symbol_aux_psymtabs (struct objfile *objfile,
/* Note: While psymtab_to_symtab can return NULL if the partial symtab /* Note: While psymtab_to_symtab can return NULL if the partial symtab
is empty, we can assume it won't here because lookup_partial_symbol is empty, we can assume it won't here because lookup_partial_symbol
succeeded. */ succeeded. */
const struct blockvector *bv = BLOCKVECTOR (stab); const struct blockvector *bv = SYMTAB_BLOCKVECTOR (stab);
struct block *block = BLOCKVECTOR_BLOCK (bv, block_index); struct block *block = BLOCKVECTOR_BLOCK (bv, block_index);
/* Some caution must be observed with overloaded functions /* Some caution must be observed with overloaded functions
@ -1266,7 +1266,7 @@ map_matching_symbols_psymtab (struct objfile *objfile,
if (s == NULL) if (s == NULL)
continue; continue;
block = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), block_kind); block = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (s), block_kind);
if (map_block (name, namespace, objfile, block, if (map_block (name, namespace, objfile, block,
callback, data, match)) callback, data, match))
return; return;
@ -2037,7 +2037,7 @@ maintenance_check_psymtabs (char *ignore, int from_tty)
/* Now do checks requiring the associated symtab. */ /* Now do checks requiring the associated symtab. */
if (s == NULL) if (s == NULL)
continue; continue;
bv = BLOCKVECTOR (s); bv = SYMTAB_BLOCKVECTOR (s);
b = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); b = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
psym = objfile->static_psymbols.list + ps->statics_offset; psym = objfile->static_psymbols.list + ps->statics_offset;
length = ps->n_static_syms; length = ps->n_static_syms;

View file

@ -184,7 +184,7 @@ stpy_global_block (PyObject *self, PyObject *args)
STPY_REQUIRE_VALID (self, symtab); STPY_REQUIRE_VALID (self, symtab);
blockvector = BLOCKVECTOR (symtab); blockvector = SYMTAB_BLOCKVECTOR (symtab);
block = BLOCKVECTOR_BLOCK (blockvector, GLOBAL_BLOCK); block = BLOCKVECTOR_BLOCK (blockvector, GLOBAL_BLOCK);
return block_to_block_object (block, SYMTAB_OBJFILE (symtab)); return block_to_block_object (block, SYMTAB_OBJFILE (symtab));
} }
@ -200,7 +200,7 @@ stpy_static_block (PyObject *self, PyObject *args)
STPY_REQUIRE_VALID (self, symtab); STPY_REQUIRE_VALID (self, symtab);
blockvector = BLOCKVECTOR (symtab); blockvector = SYMTAB_BLOCKVECTOR (symtab);
block = BLOCKVECTOR_BLOCK (blockvector, STATIC_BLOCK); block = BLOCKVECTOR_BLOCK (blockvector, STATIC_BLOCK);
return block_to_block_object (block, SYMTAB_OBJFILE (symtab)); return block_to_block_object (block, SYMTAB_OBJFILE (symtab));
} }

View file

@ -1982,7 +1982,7 @@ spu_catch_start (struct objfile *objfile)
minsym.minsym)); minsym.minsym));
if (symtab != NULL) if (symtab != NULL)
{ {
const struct blockvector *bv = BLOCKVECTOR (symtab); const struct blockvector *bv = SYMTAB_BLOCKVECTOR (symtab);
struct block *block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); struct block *block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
struct symbol *sym; struct symbol *sym;
struct symtab_and_line sal; struct symtab_and_line sal;

View file

@ -325,7 +325,7 @@ dump_symtab_1 (struct objfile *objfile, struct symtab *symtab,
if (symtab->primary) if (symtab->primary)
{ {
fprintf_filtered (outfile, "\nBlockvector:\n\n"); fprintf_filtered (outfile, "\nBlockvector:\n\n");
bv = BLOCKVECTOR (symtab); bv = SYMTAB_BLOCKVECTOR (symtab);
len = BLOCKVECTOR_NBLOCKS (bv); len = BLOCKVECTOR_NBLOCKS (bv);
for (i = 0; i < len; i++) for (i = 0; i < len; i++)
{ {

View file

@ -1526,7 +1526,7 @@ lookup_objfile_from_block (const struct block *block)
Non-primary symtabs share the block vector with their primary symtabs Non-primary symtabs share the block vector with their primary symtabs
so we use ALL_PRIMARY_SYMTABS here instead of ALL_SYMTABS. */ so we use ALL_PRIMARY_SYMTABS here instead of ALL_SYMTABS. */
ALL_PRIMARY_SYMTABS (obj, s) ALL_PRIMARY_SYMTABS (obj, s)
if (block == BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK)) if (block == BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (s), GLOBAL_BLOCK))
{ {
if (obj->separate_debug_objfile_backlink) if (obj->separate_debug_objfile_backlink)
obj = obj->separate_debug_objfile_backlink; obj = obj->separate_debug_objfile_backlink;
@ -1575,7 +1575,7 @@ lookup_global_symbol_from_objfile (const struct objfile *main_objfile,
/* Go through symtabs. */ /* Go through symtabs. */
ALL_OBJFILE_PRIMARY_SYMTABS (objfile, s) ALL_OBJFILE_PRIMARY_SYMTABS (objfile, s)
{ {
bv = BLOCKVECTOR (s); bv = SYMTAB_BLOCKVECTOR (s);
block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
sym = block_lookup_symbol (block, name, domain); sym = block_lookup_symbol (block, name, domain);
if (sym) if (sym)
@ -1610,7 +1610,7 @@ lookup_symbol_in_objfile_symtabs (struct objfile *objfile, int block_index,
ALL_OBJFILE_PRIMARY_SYMTABS (objfile, s) ALL_OBJFILE_PRIMARY_SYMTABS (objfile, s)
{ {
bv = BLOCKVECTOR (s); bv = SYMTAB_BLOCKVECTOR (s);
block = BLOCKVECTOR_BLOCK (bv, block_index); block = BLOCKVECTOR_BLOCK (bv, block_index);
sym = block_lookup_symbol (block, name, domain); sym = block_lookup_symbol (block, name, domain);
if (sym) if (sym)
@ -1698,7 +1698,7 @@ lookup_symbol_via_quick_fns (struct objfile *objfile, int block_index,
if (!symtab) if (!symtab)
return NULL; return NULL;
bv = BLOCKVECTOR (symtab); bv = SYMTAB_BLOCKVECTOR (symtab);
block = BLOCKVECTOR_BLOCK (bv, block_index); block = BLOCKVECTOR_BLOCK (bv, block_index);
sym = block_lookup_symbol (block, name, domain); sym = block_lookup_symbol (block, name, domain);
if (!sym) if (!sym)
@ -1923,7 +1923,7 @@ basic_lookup_transparent_type_quick (struct objfile *objfile, int block_index,
if (!symtab) if (!symtab)
return NULL; return NULL;
bv = BLOCKVECTOR (symtab); bv = SYMTAB_BLOCKVECTOR (symtab);
block = BLOCKVECTOR_BLOCK (bv, block_index); block = BLOCKVECTOR_BLOCK (bv, block_index);
sym = block_lookup_symbol (block, name, STRUCT_DOMAIN); sym = block_lookup_symbol (block, name, STRUCT_DOMAIN);
if (!sym) if (!sym)
@ -1960,7 +1960,7 @@ basic_lookup_transparent_type (const char *name)
{ {
ALL_OBJFILE_PRIMARY_SYMTABS (objfile, s) ALL_OBJFILE_PRIMARY_SYMTABS (objfile, s)
{ {
bv = BLOCKVECTOR (s); bv = SYMTAB_BLOCKVECTOR (s);
block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
sym = block_lookup_symbol (block, name, STRUCT_DOMAIN); sym = block_lookup_symbol (block, name, STRUCT_DOMAIN);
if (sym && !TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) if (sym && !TYPE_IS_OPAQUE (SYMBOL_TYPE (sym)))
@ -1988,7 +1988,7 @@ basic_lookup_transparent_type (const char *name)
{ {
ALL_OBJFILE_PRIMARY_SYMTABS (objfile, s) ALL_OBJFILE_PRIMARY_SYMTABS (objfile, s)
{ {
bv = BLOCKVECTOR (s); bv = SYMTAB_BLOCKVECTOR (s);
block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
sym = block_lookup_symbol (block, name, STRUCT_DOMAIN); sym = block_lookup_symbol (block, name, STRUCT_DOMAIN);
if (sym && !TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) if (sym && !TYPE_IS_OPAQUE (SYMBOL_TYPE (sym)))
@ -2081,7 +2081,7 @@ find_pc_sect_symtab (CORE_ADDR pc, struct obj_section *section)
ALL_PRIMARY_SYMTABS (objfile, s) ALL_PRIMARY_SYMTABS (objfile, s)
{ {
bv = BLOCKVECTOR (s); bv = SYMTAB_BLOCKVECTOR (s);
b = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); b = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
if (BLOCK_START (b) <= pc if (BLOCK_START (b) <= pc
@ -2316,7 +2316,7 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
return val; return val;
} }
bv = BLOCKVECTOR (s); bv = SYMTAB_BLOCKVECTOR (s);
objfile = SYMTAB_OBJFILE (s); objfile = SYMTAB_OBJFILE (s);
/* Look at all the symtabs that share this blockvector. /* Look at all the symtabs that share this blockvector.
@ -2325,7 +2325,7 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
ALL_OBJFILE_SYMTABS (objfile, s) ALL_OBJFILE_SYMTABS (objfile, s)
{ {
if (BLOCKVECTOR (s) != bv) if (SYMTAB_BLOCKVECTOR (s) != bv)
continue; continue;
/* Find the best line in this symtab. */ /* Find the best line in this symtab. */
@ -3711,7 +3711,7 @@ search_symbols (const char *regexp, enum search_domain kind,
ALL_PRIMARY_SYMTABS (objfile, s) ALL_PRIMARY_SYMTABS (objfile, s)
{ {
bv = BLOCKVECTOR (s); bv = SYMTAB_BLOCKVECTOR (s);
for (i = GLOBAL_BLOCK; i <= STATIC_BLOCK; i++) for (i = GLOBAL_BLOCK; i <= STATIC_BLOCK; i++)
{ {
b = BLOCKVECTOR_BLOCK (bv, i); b = BLOCKVECTOR_BLOCK (bv, i);
@ -4518,7 +4518,7 @@ default_make_symbol_completion_list_break_on (const char *text,
ALL_PRIMARY_SYMTABS (objfile, s) ALL_PRIMARY_SYMTABS (objfile, s)
{ {
QUIT; QUIT;
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK); b = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (s), GLOBAL_BLOCK);
ALL_BLOCK_SYMBOLS (b, iter, sym) ALL_BLOCK_SYMBOLS (b, iter, sym)
{ {
if (code == TYPE_CODE_UNDEF if (code == TYPE_CODE_UNDEF
@ -4531,7 +4531,7 @@ default_make_symbol_completion_list_break_on (const char *text,
ALL_PRIMARY_SYMTABS (objfile, s) ALL_PRIMARY_SYMTABS (objfile, s)
{ {
QUIT; QUIT;
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK); b = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (s), STATIC_BLOCK);
ALL_BLOCK_SYMBOLS (b, iter, sym) ALL_BLOCK_SYMBOLS (b, iter, sym)
{ {
if (code == TYPE_CODE_UNDEF if (code == TYPE_CODE_UNDEF
@ -4695,13 +4695,13 @@ make_file_symbol_completion_list (const char *text, const char *word,
/* Go through this symtab and check the externs and statics for /* Go through this symtab and check the externs and statics for
symbols which match. */ symbols which match. */
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK); b = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (s), GLOBAL_BLOCK);
ALL_BLOCK_SYMBOLS (b, iter, sym) ALL_BLOCK_SYMBOLS (b, iter, sym)
{ {
COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word); COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word);
} }
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK); b = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (s), STATIC_BLOCK);
ALL_BLOCK_SYMBOLS (b, iter, sym) ALL_BLOCK_SYMBOLS (b, iter, sym)
{ {
COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word); COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word);

View file

@ -980,7 +980,7 @@ struct symtab
struct symtab *user; struct symtab *user;
}; };
#define BLOCKVECTOR(symtab) (symtab)->blockvector #define SYMTAB_BLOCKVECTOR(symtab) ((symtab)->blockvector)
#define SYMTAB_LINETABLE(symtab) ((symtab)->linetable) #define SYMTAB_LINETABLE(symtab) ((symtab)->linetable)
#define SYMTAB_OBJFILE(symtab) ((symtab)->objfile) #define SYMTAB_OBJFILE(symtab) ((symtab)->objfile)
#define SYMTAB_PSPACE(symtab) (SYMTAB_OBJFILE (symtab)->pspace) #define SYMTAB_PSPACE(symtab) (SYMTAB_OBJFILE (symtab)->pspace)