aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/ada-exp.y2
-rw-r--r--gdb/ada-lang.c12
-rw-r--r--gdb/block.c11
-rw-r--r--gdb/c-exp.y2
-rw-r--r--gdb/coffread.c2
-rw-r--r--gdb/cp-support.c4
-rw-r--r--gdb/dwarf2read.c6
-rw-r--r--gdb/guile/scm-symtab.c4
-rw-r--r--gdb/jv-lang.c4
-rw-r--r--gdb/linespec.c7
-rw-r--r--gdb/maint.c2
-rw-r--r--gdb/mdebugread.c24
-rw-r--r--gdb/objfiles.c2
-rw-r--r--gdb/p-exp.y2
-rw-r--r--gdb/parse.c3
-rw-r--r--gdb/psymtab.c6
-rw-r--r--gdb/python/py-symtab.c4
-rw-r--r--gdb/spu-tdep.c2
-rw-r--r--gdb/symmisc.c2
-rw-r--r--gdb/symtab.c30
-rw-r--r--gdb/symtab.h2
22 files changed, 76 insertions, 62 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b3bbf12..451d07f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
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>
+
* buildsym.c (buildsym_objfile): New static global.
(buildsym_comp_dir): New static global.
(finish_block_internal): Delete arg objfile. All callers updated.
diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y
index bb1a767..0a49952 100644
--- a/gdb/ada-exp.y
+++ b/gdb/ada-exp.y
@@ -1033,7 +1033,7 @@ block_lookup (const struct block *context, const char *raw_name)
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)
{
if (context == NULL)
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 344db2d..e226edb 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -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
against the global and static blocks of its associated symtab. */
if (sym
- && BLOCKVECTOR_BLOCK (BLOCKVECTOR (sym->symtab), GLOBAL_BLOCK) != block
- && BLOCKVECTOR_BLOCK (BLOCKVECTOR (sym->symtab), STATIC_BLOCK) != block)
+ && BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (sym->symtab),
+ GLOBAL_BLOCK) != block
+ && BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (sym->symtab),
+ STATIC_BLOCK) != block)
return;
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)
{
QUIT;
- b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK);
+ b = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (s), GLOBAL_BLOCK);
ALL_BLOCK_SYMBOLS (b, iter, 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)
{
QUIT;
- b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK);
+ b = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (s), STATIC_BLOCK);
/* Don't do this block twice. */
if (b == surrounding_static_block)
continue;
@@ -12846,7 +12848,7 @@ ada_add_global_exceptions (regex_t *preg, VEC(ada_exc_info) **exceptions)
ALL_PRIMARY_SYMTABS (objfile, s)
{
- const struct blockvector *bv = BLOCKVECTOR (s);
+ const struct blockvector *bv = SYMTAB_BLOCKVECTOR (s);
int i;
for (i = GLOBAL_BLOCK; i <= STATIC_BLOCK; i++)
diff --git a/gdb/block.c b/gdb/block.c
index 1cb9875..83a091c 100644
--- a/gdb/block.c
+++ b/gdb/block.c
@@ -169,7 +169,7 @@ blockvector_for_pc_sect (CORE_ADDR pc, struct obj_section *section,
return 0;
}
- bl = BLOCKVECTOR (symtab);
+ bl = SYMTAB_BLOCKVECTOR (symtab);
/* Then search that symtab for the smallest block that wins. */
b = find_block_in_blockvector (bl, pc);
@@ -504,7 +504,8 @@ block_iterator_step (struct block_iterator *iterator, int first)
if (symtab == 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);
}
else
@@ -569,7 +570,8 @@ block_iter_name_step (struct block_iterator *iterator, const char *name,
if (symtab == 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,
&iterator->dict_iter);
}
@@ -638,7 +640,8 @@ block_iter_match_step (struct block_iterator *iterator,
if (symtab == 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,
compare, &iterator->dict_iter);
}
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index 242c668..92ff3b6 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -2928,7 +2928,7 @@ classify_name (struct parser_state *par_state, const struct block *block,
symtab = lookup_symtab (copy);
if (symtab)
{
- yylval.bval = BLOCKVECTOR_BLOCK (BLOCKVECTOR (symtab),
+ yylval.bval = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (symtab),
STATIC_BLOCK);
return FILENAME;
}
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 8df12cb..4a0891a 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -1544,7 +1544,7 @@ patch_opaque_types (struct symtab *s)
struct symbol *real_sym;
/* 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)
{
/* Find completed typedefs to use to fix opaque ones.
diff --git a/gdb/cp-support.c b/gdb/cp-support.c
index 72ffb52..264bcc4 100644
--- a/gdb/cp-support.c
+++ b/gdb/cp-support.c
@@ -1420,14 +1420,14 @@ make_symbol_overload_list_qualified (const char *func_name)
ALL_PRIMARY_SYMTABS (objfile, s)
{
QUIT;
- b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK);
+ b = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (s), GLOBAL_BLOCK);
make_symbol_overload_list_block (func_name, b);
}
ALL_PRIMARY_SYMTABS (objfile, s)
{
QUIT;
- b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK);
+ b = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (s), STATIC_BLOCK);
/* Don't do this block twice. */
if (b == surrounding_static_block)
continue;
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index bb1bffb..5860c57 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -3615,7 +3615,7 @@ dw2_lookup_symbol (struct objfile *objfile, int block_index,
{
struct symbol *sym = NULL;
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);
/* 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;
- if (BLOCKVECTOR (symtab) != NULL
- && blockvector_contains_pc (BLOCKVECTOR (symtab), pc))
+ if (SYMTAB_BLOCKVECTOR (symtab) != NULL
+ && blockvector_contains_pc (SYMTAB_BLOCKVECTOR (symtab), pc))
return symtab;
if (symtab->includes == NULL)
diff --git a/gdb/guile/scm-symtab.c b/gdb/guile/scm-symtab.c
index 3567ad8..0b3215f 100644
--- a/gdb/guile/scm-symtab.c
+++ b/gdb/guile/scm-symtab.c
@@ -363,7 +363,7 @@ gdbscm_symtab_global_block (SCM self)
const struct blockvector *blockvector;
const struct block *block;
- blockvector = BLOCKVECTOR (symtab);
+ blockvector = SYMTAB_BLOCKVECTOR (symtab);
block = BLOCKVECTOR_BLOCK (blockvector, GLOBAL_BLOCK);
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 block *block;
- blockvector = BLOCKVECTOR (symtab);
+ blockvector = SYMTAB_BLOCKVECTOR (symtab);
block = BLOCKVECTOR_BLOCK (blockvector, STATIC_BLOCK);
return bkscm_scm_from_block (block, SYMTAB_OBJFILE (symtab));
diff --git a/gdb/jv-lang.c b/gdb/jv-lang.c
index 69e8c16..76a2124 100644
--- a/gdb/jv-lang.c
+++ b/gdb/jv-lang.c
@@ -147,7 +147,7 @@ get_java_class_symtab (struct gdbarch *gdbarch)
obstack_alloc (&objfile->objfile_obstack,
sizeof (struct blockvector) + sizeof (struct block *));
BLOCKVECTOR_NBLOCKS (bv) = 1;
- BLOCKVECTOR (class_symtab) = bv;
+ SYMTAB_BLOCKVECTOR (class_symtab) = bv;
/* Allocate dummy STATIC_BLOCK. */
bl = allocate_block (&objfile->objfile_obstack);
@@ -173,7 +173,7 @@ add_class_symtab_symbol (struct symbol *sym)
{
struct symtab *symtab
= 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);
}
diff --git a/gdb/linespec.c b/gdb/linespec.c
index 5325702..bcfcc2a 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -1042,9 +1042,10 @@ iterate_over_all_matching_symtabs (struct linespec_state *state,
int i;
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
(block, name, domain, iterate_inline_only, &cad);
}
@@ -1081,7 +1082,7 @@ iterate_over_file_blocks (struct symtab *symtab,
{
struct block *block;
- for (block = BLOCKVECTOR_BLOCK (BLOCKVECTOR (symtab), STATIC_BLOCK);
+ for (block = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (symtab), STATIC_BLOCK);
block != NULL;
block = BLOCK_SUPERBLOCK (block))
LA_ITERATE_OVER_SYMBOLS (block, name, domain, callback, data);
diff --git a/gdb/maint.c b/gdb/maint.c
index 7fd2d58..a621f55 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -841,7 +841,7 @@ count_symtabs_and_blocks (int *nr_symtabs_ptr, int *nr_primary_symtabs_ptr,
if (s->primary)
{
++nr_primary_symtabs;
- nr_blocks += BLOCKVECTOR_NBLOCKS (BLOCKVECTOR (s));
+ nr_blocks += BLOCKVECTOR_NBLOCKS (SYMTAB_BLOCKVECTOR (s));
}
}
}
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index b520beb..5f01b70 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -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. */
class = LOC_STATIC;
- b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (top_stack->cur_st),
+ b = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (top_stack->cur_st),
GLOBAL_BLOCK);
s = new_symbol (name);
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;
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
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))
{
/* 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 block *b = top_stack->cur_block;
struct type *ftype = top_stack->cur_type;
@@ -1982,7 +1984,7 @@ parse_procedure (PDR *pr, struct symtab *search_symtab,
#else
s = mylookup_symbol
(sh_name,
- BLOCKVECTOR_BLOCK (BLOCKVECTOR (search_symtab), STATIC_BLOCK),
+ BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (search_symtab), STATIC_BLOCK),
VAR_DOMAIN,
LOC_BLOCK);
#endif
@@ -4194,7 +4196,7 @@ psymtab_to_symtab_1 (struct objfile *objfile,
push_parse_stack ();
top_stack->cur_st = st;
- top_stack->cur_block = BLOCKVECTOR_BLOCK (BLOCKVECTOR (st),
+ top_stack->cur_block = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (st),
STATIC_BLOCK);
BLOCK_START (top_stack->cur_block) = pst->textlow;
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? */
top_stack->cur_st = st;
top_stack->cur_block
- = BLOCKVECTOR_BLOCK (BLOCKVECTOR (top_stack->cur_st),
+ = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (top_stack->cur_st),
GLOBAL_BLOCK);
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
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,
(sizeof (struct blockvector)
+ BLOCKVECTOR_NBLOCKS (bv)
* sizeof (bv->block)));
- if (bv != BLOCKVECTOR (s))
- BLOCKVECTOR (s) = bv;
+ if (bv != SYMTAB_BLOCKVECTOR (s))
+ SYMTAB_BLOCKVECTOR (s) = bv;
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
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)
{
@@ -4738,7 +4740,7 @@ new_symtab (const char *name, int maxlines, struct objfile *objfile)
BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK) = new_block (NON_FUNCTION_BLOCK);
BLOCK_SUPERBLOCK (BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK)) =
BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
- BLOCKVECTOR (s) = bv;
+ SYMTAB_BLOCKVECTOR (s) = bv;
s->debugformat = "ECOFF";
return (s);
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 00d267a..cbe1b8c 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -760,7 +760,7 @@ objfile_relocate1 (struct objfile *objfile,
if (!s->primary)
continue;
- bv = BLOCKVECTOR (s);
+ bv = SYMTAB_BLOCKVECTOR (s);
if (BLOCKVECTOR_MAP (bv))
addrmap_relocate (BLOCKVECTOR_MAP (bv),
ANOFFSET (delta, s->block_line_section));
diff --git a/gdb/p-exp.y b/gdb/p-exp.y
index f128fcb..1c966cc 100644
--- a/gdb/p-exp.y
+++ b/gdb/p-exp.y
@@ -675,7 +675,7 @@ block : BLOCKNAME
struct symtab *tem =
lookup_symtab (copy_name ($1.stoken));
if (tem)
- $$ = BLOCKVECTOR_BLOCK (BLOCKVECTOR (tem),
+ $$ = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (tem),
STATIC_BLOCK);
else
error (_("No file or function \"%s\"."),
diff --git a/gdb/parse.c b/gdb/parse.c
index 5540a79..d161776 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -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 ();
if (cursal.symtab)
expression_context_block
- = BLOCKVECTOR_BLOCK (BLOCKVECTOR (cursal.symtab), STATIC_BLOCK);
+ = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (cursal.symtab),
+ STATIC_BLOCK);
if (expression_context_block)
expression_context_pc = BLOCK_START (expression_context_block);
}
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index 9cfc2c1..da22d21 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -513,7 +513,7 @@ lookup_symbol_aux_psymtabs (struct objfile *objfile,
/* 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
succeeded. */
- const struct blockvector *bv = BLOCKVECTOR (stab);
+ const struct blockvector *bv = SYMTAB_BLOCKVECTOR (stab);
struct block *block = BLOCKVECTOR_BLOCK (bv, block_index);
/* Some caution must be observed with overloaded functions
@@ -1266,7 +1266,7 @@ map_matching_symbols_psymtab (struct objfile *objfile,
if (s == NULL)
continue;
- block = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), block_kind);
+ block = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (s), block_kind);
if (map_block (name, namespace, objfile, block,
callback, data, match))
return;
@@ -2037,7 +2037,7 @@ maintenance_check_psymtabs (char *ignore, int from_tty)
/* Now do checks requiring the associated symtab. */
if (s == NULL)
continue;
- bv = BLOCKVECTOR (s);
+ bv = SYMTAB_BLOCKVECTOR (s);
b = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
psym = objfile->static_psymbols.list + ps->statics_offset;
length = ps->n_static_syms;
diff --git a/gdb/python/py-symtab.c b/gdb/python/py-symtab.c
index e4e3ec1..6f4070d 100644
--- a/gdb/python/py-symtab.c
+++ b/gdb/python/py-symtab.c
@@ -184,7 +184,7 @@ stpy_global_block (PyObject *self, PyObject *args)
STPY_REQUIRE_VALID (self, symtab);
- blockvector = BLOCKVECTOR (symtab);
+ blockvector = SYMTAB_BLOCKVECTOR (symtab);
block = BLOCKVECTOR_BLOCK (blockvector, GLOBAL_BLOCK);
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);
- blockvector = BLOCKVECTOR (symtab);
+ blockvector = SYMTAB_BLOCKVECTOR (symtab);
block = BLOCKVECTOR_BLOCK (blockvector, STATIC_BLOCK);
return block_to_block_object (block, SYMTAB_OBJFILE (symtab));
}
diff --git a/gdb/spu-tdep.c b/gdb/spu-tdep.c
index 30e569f..897cd72 100644
--- a/gdb/spu-tdep.c
+++ b/gdb/spu-tdep.c
@@ -1982,7 +1982,7 @@ spu_catch_start (struct objfile *objfile)
minsym.minsym));
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 symbol *sym;
struct symtab_and_line sal;
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index 42e43fd..a687cf0 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -325,7 +325,7 @@ dump_symtab_1 (struct objfile *objfile, struct symtab *symtab,
if (symtab->primary)
{
fprintf_filtered (outfile, "\nBlockvector:\n\n");
- bv = BLOCKVECTOR (symtab);
+ bv = SYMTAB_BLOCKVECTOR (symtab);
len = BLOCKVECTOR_NBLOCKS (bv);
for (i = 0; i < len; i++)
{
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 58aa6e9..3ae0af8 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -1526,7 +1526,7 @@ lookup_objfile_from_block (const struct block *block)
Non-primary symtabs share the block vector with their primary symtabs
so we use ALL_PRIMARY_SYMTABS here instead of ALL_SYMTABS. */
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)
obj = obj->separate_debug_objfile_backlink;
@@ -1575,7 +1575,7 @@ lookup_global_symbol_from_objfile (const struct objfile *main_objfile,
/* Go through symtabs. */
ALL_OBJFILE_PRIMARY_SYMTABS (objfile, s)
{
- bv = BLOCKVECTOR (s);
+ bv = SYMTAB_BLOCKVECTOR (s);
block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
sym = block_lookup_symbol (block, name, domain);
if (sym)
@@ -1610,7 +1610,7 @@ lookup_symbol_in_objfile_symtabs (struct objfile *objfile, int block_index,
ALL_OBJFILE_PRIMARY_SYMTABS (objfile, s)
{
- bv = BLOCKVECTOR (s);
+ bv = SYMTAB_BLOCKVECTOR (s);
block = BLOCKVECTOR_BLOCK (bv, block_index);
sym = block_lookup_symbol (block, name, domain);
if (sym)
@@ -1698,7 +1698,7 @@ lookup_symbol_via_quick_fns (struct objfile *objfile, int block_index,
if (!symtab)
return NULL;
- bv = BLOCKVECTOR (symtab);
+ bv = SYMTAB_BLOCKVECTOR (symtab);
block = BLOCKVECTOR_BLOCK (bv, block_index);
sym = block_lookup_symbol (block, name, domain);
if (!sym)
@@ -1923,7 +1923,7 @@ basic_lookup_transparent_type_quick (struct objfile *objfile, int block_index,
if (!symtab)
return NULL;
- bv = BLOCKVECTOR (symtab);
+ bv = SYMTAB_BLOCKVECTOR (symtab);
block = BLOCKVECTOR_BLOCK (bv, block_index);
sym = block_lookup_symbol (block, name, STRUCT_DOMAIN);
if (!sym)
@@ -1960,7 +1960,7 @@ basic_lookup_transparent_type (const char *name)
{
ALL_OBJFILE_PRIMARY_SYMTABS (objfile, s)
{
- bv = BLOCKVECTOR (s);
+ bv = SYMTAB_BLOCKVECTOR (s);
block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
sym = block_lookup_symbol (block, name, STRUCT_DOMAIN);
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)
{
- bv = BLOCKVECTOR (s);
+ bv = SYMTAB_BLOCKVECTOR (s);
block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
sym = block_lookup_symbol (block, name, STRUCT_DOMAIN);
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)
{
- bv = BLOCKVECTOR (s);
+ bv = SYMTAB_BLOCKVECTOR (s);
b = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
if (BLOCK_START (b) <= pc
@@ -2316,7 +2316,7 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
return val;
}
- bv = BLOCKVECTOR (s);
+ bv = SYMTAB_BLOCKVECTOR (s);
objfile = SYMTAB_OBJFILE (s);
/* 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)
{
- if (BLOCKVECTOR (s) != bv)
+ if (SYMTAB_BLOCKVECTOR (s) != bv)
continue;
/* 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)
{
- bv = BLOCKVECTOR (s);
+ bv = SYMTAB_BLOCKVECTOR (s);
for (i = GLOBAL_BLOCK; i <= STATIC_BLOCK; 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)
{
QUIT;
- b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK);
+ b = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (s), GLOBAL_BLOCK);
ALL_BLOCK_SYMBOLS (b, iter, sym)
{
if (code == TYPE_CODE_UNDEF
@@ -4531,7 +4531,7 @@ default_make_symbol_completion_list_break_on (const char *text,
ALL_PRIMARY_SYMTABS (objfile, s)
{
QUIT;
- b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK);
+ b = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (s), STATIC_BLOCK);
ALL_BLOCK_SYMBOLS (b, iter, sym)
{
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
symbols which match. */
- b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK);
+ b = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (s), GLOBAL_BLOCK);
ALL_BLOCK_SYMBOLS (b, iter, sym)
{
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)
{
COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word);
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 9a8c404..169c6a6 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -980,7 +980,7 @@ struct symtab
struct symtab *user;
};
-#define BLOCKVECTOR(symtab) (symtab)->blockvector
+#define SYMTAB_BLOCKVECTOR(symtab) ((symtab)->blockvector)
#define SYMTAB_LINETABLE(symtab) ((symtab)->linetable)
#define SYMTAB_OBJFILE(symtab) ((symtab)->objfile)
#define SYMTAB_PSPACE(symtab) (SYMTAB_OBJFILE (symtab)->pspace)