diff options
50 files changed, 471 insertions, 446 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 158c568..83fab1f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,28 @@ +2003-05-14 Elena Zannoni <ezannoni@redhat.com> + + * symtab.h (enum domain_enum): Rename from namespace_enum. + (UNDEF_DOMAIN, VAR_DOMAIN, STRUCT_DOMAIN, LABEL_DOMAIN, + VARIABLES_DOMAIN, FUNCTIONS_DOMAIN, TYPES_DOMAIN, METHODS_DOMAIN): + Rename from UNDEF_NAMESPACE, VAR_NAMESPACE, STRUCT_NAMESPACE, + LABEL_NAMESPACE, VARIABLES_NAMESPACE, FUNCTIONS_NAMESPACE, + TYPES_NAMESPACE, METHODS_NAMESPACE. + (SYMBOL_NAMESPACE): Rename to SYMBOL_DOMAIN. + (struct symbol, struct partial_symbol): Rename field + 'namespace_enum namespace' to 'domain_enum domain'. + (PSYMBOL_NAMESPACE): Rename to PSYMBOL_DOMAIN. + Delete old define kludge for namespace. + + * ada-exp.y, ada-lang.c, ada-lang.h, alpha-tdep.c, arm-tdep.c, + blockframe.c, c-exp.y, c-valprint.c, coffread.c, dbxread.c, + dwarf2read.c, dwarfread.c, f-exp.y, gdbtypes.c, gdbtypes.h, + gnu-v3-abi.c, hppa-tdep.c, hpread.c, jv-exp.y, jv-lang.c, + language.c, linespec.c, m2-exp.y, m3-nat.c, mdebugread.c, + mips-tdep.c, nlmread.c, objc-exp.y, objc-lang.c, objfiles.c, + p-exp.y, p-valprint.c, parse.c, printcmd.c, scm-lang.c, source.c, + stabsread.c, stack.c, symfile.c, symfile.h, symmisc.c, symtab.c, + valops.c, values.c, xcoffread.c, xstormy16-tdep.c: Replace all + occurrences of the above. + 2003-05-14 Ian Lance Taylor <ian@airs.com> * Makefile.in (install-only): Use $(SHELL) when running diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y index 70e6e08..8d9bc04 100644 --- a/gdb/ada-exp.y +++ b/gdb/ada-exp.y @@ -840,7 +840,7 @@ write_object_renaming (orig_left_context, renaming) parser-defs.h, implemented in parse.c */ strncpy (name, expr, suffix-expr); name[suffix-expr] = '\000'; - sym = lookup_symbol (name, orig_left_context, VAR_NAMESPACE, 0, NULL); + sym = lookup_symbol (name, orig_left_context, VAR_DOMAIN, 0, NULL); /* if (sym == NULL) error ("Could not find renamed variable: %s", ada_demangle (name)); */ @@ -893,7 +893,7 @@ write_object_renaming (orig_left_context, renaming) suffix = end; index_sym = - lookup_symbol (index_name, NULL, VAR_NAMESPACE, 0, NULL); + lookup_symbol (index_name, NULL, VAR_DOMAIN, 0, NULL); if (index_sym == NULL) error ("Could not find %s", index_name); write_var_from_sym (NULL, block_found, sym); diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index b047442..8d8998b 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -90,7 +90,7 @@ static struct value *make_array_descriptor (struct type *, struct value *, CORE_ADDR *); static void ada_add_block_symbols (struct block *, const char *, - namespace_enum, struct objfile *, int); + domain_enum, struct objfile *, int); static void fill_in_ada_prototype (struct symbol *); @@ -100,7 +100,7 @@ static void add_defn_to_vec (struct symbol *, struct block *); static struct partial_symbol *ada_lookup_partial_symbol (struct partial_symtab *, const char *, int, - namespace_enum, int); + domain_enum, int); static struct symtab *symtab_for_sym (struct symbol *); @@ -189,7 +189,7 @@ static struct value *value_pos_atr (struct value *); static struct value *value_val_atr (struct type *, struct value *); -static struct symbol *standard_lookup (const char *, namespace_enum); +static struct symbol *standard_lookup (const char *, domain_enum); extern void markTimeStart (int index); extern void markTimeStop (int index); @@ -705,7 +705,7 @@ ada_match_name (const char *sym_name, const char *name, int wild) int ada_suppress_symbol_printing (struct symbol *sym) { - if (SYMBOL_NAMESPACE (sym) == STRUCT_NAMESPACE) + if (SYMBOL_DOMAIN (sym) == STRUCT_DOMAIN) return 1; else return is_suppressed_name (DEPRECATED_SYMBOL_NAME (sym)); @@ -1232,7 +1232,7 @@ decode_packed_array_type (struct type *type) /* NOTE: Use ada_lookup_symbol_list because of bug in some versions * of gcc (Solaris, e.g.). FIXME when compiler is fixed. */ n = ada_lookup_symbol_list (name, get_selected_block (NULL), - VAR_NAMESPACE, &syms, &blocks); + VAR_DOMAIN, &syms, &blocks); for (i = 0; i < n; i += 1) if (syms[i] != NULL && SYMBOL_CLASS (syms[i]) == LOC_TYPEDEF && STREQ (name, ada_type_name (SYMBOL_TYPE (syms[i])))) @@ -2151,7 +2151,7 @@ ada_resolve_subexp (struct expression **expp, int *pos, int deprocedure_p, n_candidates = ada_lookup_symbol_list (exp->elts[pc + 2].name, exp->elts[pc + 1].block, - VAR_NAMESPACE, + VAR_DOMAIN, &candidate_syms, &candidate_blocks); @@ -2253,7 +2253,7 @@ ada_resolve_subexp (struct expression **expp, int *pos, int deprocedure_p, n_candidates = ada_lookup_symbol_list (exp->elts[pc + 5].name, exp->elts[pc + 4].block, - VAR_NAMESPACE, + VAR_DOMAIN, &candidate_syms, &candidate_blocks); if (n_candidates == 1) @@ -2307,7 +2307,7 @@ ada_resolve_subexp (struct expression **expp, int *pos, int deprocedure_p, n_candidates = ada_lookup_symbol_list (ada_mangle (ada_op_name (op)), - (struct block *) NULL, VAR_NAMESPACE, + (struct block *) NULL, VAR_DOMAIN, &candidate_syms, &candidate_blocks); i = ada_resolve_function (candidate_syms, candidate_blocks, @@ -3175,14 +3175,14 @@ static struct symbol **defn_symbols = NULL; static struct block **defn_blocks = NULL; /* Return the result of a standard (literal, C-like) lookup of NAME in - * given NAMESPACE. */ + * given DOMAIN. */ static struct symbol * -standard_lookup (const char *name, namespace_enum namespace) +standard_lookup (const char *name, domain_enum domain) { struct symbol *sym; struct symtab *symtab; - sym = lookup_symbol (name, (struct block *) NULL, namespace, 0, &symtab); + sym = lookup_symbol (name, (struct block *) NULL, domain, 0, &symtab); return sym; } @@ -3231,7 +3231,7 @@ lesseq_defined_than (struct symbol *sym0, struct symbol *sym1) { if (sym0 == sym1) return 1; - if (SYMBOL_NAMESPACE (sym0) != SYMBOL_NAMESPACE (sym1) + if (SYMBOL_DOMAIN (sym0) != SYMBOL_DOMAIN (sym1) || SYMBOL_CLASS (sym0) != SYMBOL_CLASS (sym1)) return 0; @@ -3293,13 +3293,13 @@ add_defn_to_vec (struct symbol *sym, struct block *block) ndefns += 1; } -/* Look, in partial_symtab PST, for symbol NAME in given namespace. +/* Look, in partial_symtab PST, for symbol NAME in given domain. Check the global symbols if GLOBAL, the static symbols if not. Do wild-card match if WILD. */ static struct partial_symbol * ada_lookup_partial_symbol (struct partial_symtab *pst, const char *name, - int global, namespace_enum namespace, int wild) + int global, domain_enum domain, int wild) { struct partial_symbol **start; int name_len = strlen (name); @@ -3321,7 +3321,7 @@ ada_lookup_partial_symbol (struct partial_symtab *pst, const char *name, { struct partial_symbol *psym = start[i]; - if (SYMBOL_NAMESPACE (psym) == namespace && + if (SYMBOL_DOMAIN (psym) == domain && wild_match (name, name_len, DEPRECATED_SYMBOL_NAME (psym))) return psym; } @@ -3355,7 +3355,7 @@ ada_lookup_partial_symbol (struct partial_symtab *pst, const char *name, { struct partial_symbol *psym = start[i]; - if (SYMBOL_NAMESPACE (psym) == namespace) + if (SYMBOL_DOMAIN (psym) == domain) { int cmp = strncmp (name, DEPRECATED_SYMBOL_NAME (psym), name_len); @@ -3397,7 +3397,7 @@ ada_lookup_partial_symbol (struct partial_symtab *pst, const char *name, { struct partial_symbol *psym = start[i]; - if (SYMBOL_NAMESPACE (psym) == namespace) + if (SYMBOL_DOMAIN (psym) == domain) { int cmp; @@ -3507,7 +3507,7 @@ ada_lookup_minimal_symbol (const char *name) } /* For all subprograms that statically enclose the subprogram of the - * selected frame, add symbols matching identifier NAME in NAMESPACE + * selected frame, add symbols matching identifier NAME in DOMAIN * and their blocks to vectors *defn_symbols and *defn_blocks, as for * ada_add_block_symbols (q.v.). If WILD, treat as NAME with a * wildcard prefix. At the moment, this function uses a heuristic to @@ -3516,7 +3516,7 @@ ada_lookup_minimal_symbol (const char *name) * frame as a static link, and then searches up the call stack for a * frame with that same local-variable base. */ static void -add_symbols_from_enclosing_procs (const char *name, namespace_enum namespace, +add_symbols_from_enclosing_procs (const char *name, domain_enum domain, int wild_match) { #ifdef i386 @@ -3535,7 +3535,7 @@ add_symbols_from_enclosing_procs (const char *name, namespace_enum namespace, DEPRECATED_SYMBOL_NAME (static_link) = ""; SYMBOL_LANGUAGE (static_link) = language_unknown; SYMBOL_CLASS (static_link) = LOC_LOCAL; - SYMBOL_NAMESPACE (static_link) = VAR_NAMESPACE; + SYMBOL_DOMAIN (static_link) = VAR_DOMAIN; SYMBOL_TYPE (static_link) = lookup_pointer_type (builtin_type_void); SYMBOL_VALUE (static_link) = -(long) TYPE_LENGTH (SYMBOL_TYPE (static_link)); @@ -3566,7 +3566,7 @@ add_symbols_from_enclosing_procs (const char *name, namespace_enum namespace, block = get_frame_block (frame, 0); while (block != NULL && block_function (block) != NULL && ndefns == 0) { - ada_add_block_symbols (block, name, namespace, NULL, wild_match); + ada_add_block_symbols (block, name, domain, NULL, wild_match); block = BLOCK_SUPERBLOCK (block); } @@ -3632,7 +3632,7 @@ remove_extra_symbols (struct symbol **syms, struct block **blocks, int nsyms) return nsyms; } -/* Find symbols in NAMESPACE matching NAME, in BLOCK0 and enclosing +/* Find symbols in DOMAIN matching NAME, in BLOCK0 and enclosing scope and in global scopes, returning the number of matches. Sets *SYMS to point to a vector of matching symbols, with *BLOCKS pointing to the vector of corresponding blocks in which those @@ -3645,7 +3645,7 @@ remove_extra_symbols (struct symbol **syms, struct block **blocks, int nsyms) int ada_lookup_symbol_list (const char *name, struct block *block0, - namespace_enum namespace, struct symbol ***syms, + domain_enum domain, struct symbol ***syms, struct block ***blocks) { struct symbol *sym; @@ -3671,7 +3671,7 @@ ada_lookup_symbol_list (const char *name, struct block *block0, block = block0; while (block != NULL) { - ada_add_block_symbols (block, name, namespace, NULL, wild_match); + ada_add_block_symbols (block, name, domain, NULL, wild_match); /* If we found a non-function match, assume that's the one. */ if (is_nonfunction (defn_symbols, ndefns)) @@ -3697,10 +3697,10 @@ ada_lookup_symbol_list (const char *name, struct block *block0, continue; bv = BLOCKVECTOR (s); block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); - ada_add_block_symbols (block, name, namespace, objfile, wild_match); + ada_add_block_symbols (block, name, domain, objfile, wild_match); } - if (namespace == VAR_NAMESPACE) + if (domain == VAR_DOMAIN) { ALL_MSYMBOLS (objfile, msymbol) { @@ -3720,13 +3720,13 @@ ada_lookup_symbol_list (const char *name, struct block *block0, block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); ada_add_block_symbols (block, DEPRECATED_SYMBOL_NAME (msymbol), - namespace, objfile, wild_match); + domain, objfile, wild_match); if (ndefns == old_ndefns) { block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); ada_add_block_symbols (block, DEPRECATED_SYMBOL_NAME (msymbol), - namespace, objfile, + domain, objfile, wild_match); } } @@ -3739,14 +3739,14 @@ ada_lookup_symbol_list (const char *name, struct block *block0, { QUIT; if (!ps->readin - && ada_lookup_partial_symbol (ps, name, 1, namespace, wild_match)) + && ada_lookup_partial_symbol (ps, name, 1, domain, wild_match)) { s = PSYMTAB_TO_SYMTAB (ps); if (!s->primary) continue; bv = BLOCKVECTOR (s); block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); - ada_add_block_symbols (block, name, namespace, objfile, wild_match); + ada_add_block_symbols (block, name, domain, objfile, wild_match); } } @@ -3764,21 +3764,21 @@ ada_lookup_symbol_list (const char *name, struct block *block0, continue; bv = BLOCKVECTOR (s); block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); - ada_add_block_symbols (block, name, namespace, objfile, wild_match); + ada_add_block_symbols (block, name, domain, objfile, wild_match); } ALL_PSYMTABS (objfile, ps) { QUIT; if (!ps->readin - && ada_lookup_partial_symbol (ps, name, 0, namespace, wild_match)) + && ada_lookup_partial_symbol (ps, name, 0, domain, wild_match)) { s = PSYMTAB_TO_SYMTAB (ps); bv = BLOCKVECTOR (s); if (!s->primary) continue; block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); - ada_add_block_symbols (block, name, namespace, + ada_add_block_symbols (block, name, domain, objfile, wild_match); } } @@ -3789,7 +3789,7 @@ ada_lookup_symbol_list (const char *name, struct block *block0, rare. */ if (ndefns == 0) { - add_symbols_from_enclosing_procs (name, namespace, wild_match); + add_symbols_from_enclosing_procs (name, domain, wild_match); if (ndefns > 0) goto done; } @@ -3806,7 +3806,7 @@ done: return ndefns; } -/* Return a symbol in NAMESPACE matching NAME, in BLOCK0 and enclosing +/* Return a symbol in DOMAIN matching NAME, in BLOCK0 and enclosing * scope and in global scopes, or NULL if none. NAME is folded to * lower case first, unless it is surrounded in single quotes. * Otherwise, the result is as for ada_lookup_symbol_list, but is @@ -3814,14 +3814,14 @@ done: struct symbol * ada_lookup_symbol (const char *name, struct block *block0, - namespace_enum namespace) + domain_enum domain) { struct symbol **candidate_syms; struct block **candidate_blocks; int n_candidates; n_candidates = ada_lookup_symbol_list (name, - block0, namespace, + block0, domain, &candidate_syms, &candidate_blocks); if (n_candidates == 0) @@ -3937,7 +3937,7 @@ wild_match (const char *patn, int patn_len, const char *name) } -/* Add symbols from BLOCK matching identifier NAME in NAMESPACE to +/* Add symbols from BLOCK matching identifier NAME in DOMAIN to vector *defn_symbols, updating *defn_symbols (if necessary), *SZ (the size of the vector *defn_symbols), and *ndefns (the number of symbols currently stored in *defn_symbols). If WILD, treat as NAME with a @@ -3945,7 +3945,7 @@ wild_match (const char *patn, int patn_len, const char *name) static void ada_add_block_symbols (struct block *block, const char *name, - namespace_enum namespace, struct objfile *objfile, + domain_enum domain, struct objfile *objfile, int wild) { int i; @@ -3964,7 +3964,7 @@ ada_add_block_symbols (struct block *block, const char *name, struct symbol *sym; ALL_BLOCK_SYMBOLS (block, i, sym) { - if (SYMBOL_NAMESPACE (sym) == namespace && + if (SYMBOL_DOMAIN (sym) == domain && wild_match (name, name_len, DEPRECATED_SYMBOL_NAME (sym))) { switch (SYMBOL_CLASS (sym)) @@ -4016,7 +4016,7 @@ ada_add_block_symbols (struct block *block, const char *name, for (; i < BLOCK_BUCKETS (block); i += 1) for (sym = BLOCK_BUCKET (block, i); sym != NULL; sym = sym->hash_next) { - if (SYMBOL_NAMESPACE (sym) == namespace) + if (SYMBOL_DOMAIN (sym) == domain) { int cmp = strncmp (name, DEPRECATED_SYMBOL_NAME (sym), name_len); @@ -4093,7 +4093,7 @@ ada_add_block_symbols (struct block *block, const char *name, { struct symbol *sym = BLOCK_SYM (block, i); - if (SYMBOL_NAMESPACE (sym) == namespace) + if (SYMBOL_DOMAIN (sym) == domain) { int cmp; @@ -4388,10 +4388,10 @@ ada_finish_decode_line_1 (char **spec, struct symtab *file_table, n_matches = 0; if (lower_name != NULL) n_matches = ada_lookup_symbol_list (ada_mangle (lower_name), block, - VAR_NAMESPACE, &symbols, &blocks); + VAR_DOMAIN, &symbols, &blocks); if (n_matches == 0) n_matches = ada_lookup_symbol_list (unquoted_name, block, - VAR_NAMESPACE, &symbols, &blocks); + VAR_DOMAIN, &symbols, &blocks); if (n_matches == 0 && line_num >= 0) error ("No line number information found for %s.", unquoted_name); else if (n_matches == 0) @@ -4637,7 +4637,7 @@ nearest_line_number_in_linetable (struct linetable *linetable, int line_num) else { struct symbol *sym = - standard_lookup (func_name, VAR_NAMESPACE); + standard_lookup (func_name, VAR_DOMAIN); if (is_plausible_func_for_line (sym, line_num)) best = item->line; else @@ -4711,7 +4711,7 @@ find_next_line_in_linetable (struct linetable *linetable, int line_num, if (item->line == line_num) { struct symbol *sym = - standard_lookup (func_name, VAR_NAMESPACE); + standard_lookup (func_name, VAR_DOMAIN); if (is_plausible_func_for_line (sym, starting_line)) return i; else @@ -5855,11 +5855,11 @@ ada_find_any_type (const char *name) { struct symbol *sym; - sym = standard_lookup (name, VAR_NAMESPACE); + sym = standard_lookup (name, VAR_DOMAIN); if (sym != NULL && SYMBOL_CLASS (sym) == LOC_TYPEDEF) return SYMBOL_TYPE (sym); - sym = standard_lookup (name, STRUCT_NAMESPACE); + sym = standard_lookup (name, STRUCT_DOMAIN); if (sym != NULL) return SYMBOL_TYPE (sym); @@ -7821,7 +7821,7 @@ get_var_value (char *name, char *err_msg) int nsyms; nsyms = - ada_lookup_symbol_list (name, get_selected_block (NULL), VAR_NAMESPACE, + ada_lookup_symbol_list (name, get_selected_block (NULL), VAR_DOMAIN, &syms, &blocks); if (nsyms != 1) diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h index 3f00b9a..ae863bd 100644 --- a/gdb/ada-lang.h +++ b/gdb/ada-lang.h @@ -223,13 +223,13 @@ extern struct type *ada_index_type (struct type *, int); extern struct value *ada_array_bound (struct value *, int, int); extern int ada_lookup_symbol_list (const char *, struct block *, - namespace_enum, struct symbol ***, + domain_enum, struct symbol ***, struct block ***); extern char *ada_fold_name (const char *); extern struct symbol *ada_lookup_symbol (const char *, struct block *, - namespace_enum); + domain_enum); extern struct minimal_symbol *ada_lookup_minimal_symbol (const char *); diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index 74f4f7d..a9377bc 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -849,7 +849,7 @@ find_proc_desc (CORE_ADDR pc, struct frame_info *next_frame) symbol reading. */ sym = NULL; else - sym = lookup_symbol (MIPS_EFI_SYMBOL_NAME, b, LABEL_NAMESPACE, + sym = lookup_symbol (MIPS_EFI_SYMBOL_NAME, b, LABEL_DOMAIN, 0, NULL); } diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 59fa269..55441e8 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -443,7 +443,7 @@ arm_skip_prologue (CORE_ADDR pc) struct symbol *sym; /* Found a function. */ - sym = lookup_symbol (func_name, NULL, VAR_NAMESPACE, NULL, NULL); + sym = lookup_symbol (func_name, NULL, VAR_DOMAIN, NULL, NULL); if (sym && SYMBOL_LANGUAGE (sym) != language_asm) { /* Don't use this trick for assembly source files. */ diff --git a/gdb/blockframe.c b/gdb/blockframe.c index fce25e4..3c71376 100644 --- a/gdb/blockframe.c +++ b/gdb/blockframe.c @@ -97,7 +97,7 @@ inside_main_func (CORE_ADDR pc) { struct symbol *mainsym; - mainsym = lookup_symbol (main_name (), NULL, VAR_NAMESPACE, NULL, NULL); + mainsym = lookup_symbol (main_name (), NULL, VAR_DOMAIN, NULL, NULL); if (mainsym && SYMBOL_CLASS (mainsym) == LOC_BLOCK) { symfile_objfile->ei.main_func_lowpc = diff --git a/gdb/c-exp.y b/gdb/c-exp.y index cd4e8d0..b8683d7 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -567,7 +567,7 @@ block : BLOCKNAME block : block COLONCOLON name { struct symbol *tem = lookup_symbol (copy_name ($3), $1, - VAR_NAMESPACE, (int *) NULL, + VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL); if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK) error ("No function \"%s\" in specified context.", @@ -578,7 +578,7 @@ block : block COLONCOLON name variable: block COLONCOLON name { struct symbol *sym; sym = lookup_symbol (copy_name ($3), $1, - VAR_NAMESPACE, (int *) NULL, + VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL); if (sym == 0) error ("No symbol \"%s\" in specified context.", @@ -637,7 +637,7 @@ variable: qualified_name sym = lookup_symbol (name, (const struct block *) NULL, - VAR_NAMESPACE, (int *) NULL, + VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL); if (sym) { @@ -1661,7 +1661,7 @@ yylex () int hextype; sym = lookup_symbol (tmp, expression_context_block, - VAR_NAMESPACE, + VAR_DOMAIN, current_language->la_language == language_cplus ? &is_a_field_of_this : (int *) NULL, (struct symtab **) NULL); @@ -1749,7 +1749,7 @@ yylex () memcpy (tmp1, namestart, p - namestart); tmp1[p - namestart] = '\0'; cur_sym = lookup_symbol (ncopy, expression_context_block, - VAR_NAMESPACE, (int *) NULL, + VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL); if (cur_sym) { diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index a07717a..848f7ac 100644 --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c @@ -219,7 +219,7 @@ c_val_print (struct type *type, char *valaddr, int embedded_offset, if (msymbol != NULL) wsym = lookup_symbol (DEPRECATED_SYMBOL_NAME (msymbol), block, - VAR_NAMESPACE, &is_this_fld, &s); + VAR_DOMAIN, &is_this_fld, &s); if (wsym) { diff --git a/gdb/coffread.c b/gdb/coffread.c index 0f36b95..6daf7b4 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -1425,7 +1425,7 @@ patch_opaque_types (struct symtab *s) but search the whole chain, as there may be several syms from different files with the same name. */ if (SYMBOL_CLASS (real_sym) == LOC_TYPEDEF && - SYMBOL_NAMESPACE (real_sym) == VAR_NAMESPACE && + SYMBOL_DOMAIN (real_sym) == VAR_DOMAIN && TYPE_CODE (SYMBOL_TYPE (real_sym)) == TYPE_CODE_PTR && TYPE_LENGTH (TYPE_TARGET_TYPE (SYMBOL_TYPE (real_sym))) != 0) { @@ -1487,7 +1487,7 @@ process_coff_symbol (register struct coff_symbol *cs, /* default assumptions */ SYMBOL_VALUE (sym) = cs->c_value; - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; SYMBOL_SECTION (sym) = cs_to_section (cs, objfile); if (ISFCN (cs->c_type)) @@ -1609,7 +1609,7 @@ process_coff_symbol (register struct coff_symbol *cs, case C_TPDEF: SYMBOL_CLASS (sym) = LOC_TYPEDEF; - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; /* If type has no name, give it one */ if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0) @@ -1669,7 +1669,7 @@ process_coff_symbol (register struct coff_symbol *cs, case C_UNTAG: case C_ENTAG: SYMBOL_CLASS (sym) = LOC_TYPEDEF; - SYMBOL_NAMESPACE (sym) = STRUCT_NAMESPACE; + SYMBOL_DOMAIN (sym) = STRUCT_DOMAIN; /* Some compilers try to be helpful by inventing "fake" names for anonymous enums, structures, and unions, like @@ -2079,7 +2079,7 @@ coff_read_enum_type (int index, int length, int lastsym) obsavestring (name, strlen (name), ¤t_objfile->symbol_obstack); SYMBOL_CLASS (sym) = LOC_CONST; - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; SYMBOL_VALUE (sym) = ms->c_value; add_symbol_to_list (sym, symlist); nsyms++; diff --git a/gdb/dbxread.c b/gdb/dbxread.c index d813553..752efdd 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -1762,7 +1762,7 @@ read_dbx_symtab (struct objfile *objfile) namestring = STATIC_TRANSFORM_NAME (namestring); #endif add_psymbol_to_list (namestring, p - namestring, - VAR_NAMESPACE, LOC_STATIC, + VAR_DOMAIN, LOC_STATIC, &objfile->static_psymbols, 0, nlist.n_value, psymtab_language, objfile); @@ -1772,7 +1772,7 @@ read_dbx_symtab (struct objfile *objfile) /* The addresses in these entries are reported to be wrong. See the code that reads 'G's for symtabs. */ add_psymbol_to_list (namestring, p - namestring, - VAR_NAMESPACE, LOC_STATIC, + VAR_DOMAIN, LOC_STATIC, &objfile->global_psymbols, 0, nlist.n_value, psymtab_language, objfile); @@ -1790,7 +1790,7 @@ read_dbx_symtab (struct objfile *objfile) && namestring[0] != ' ')) { add_psymbol_to_list (namestring, p - namestring, - STRUCT_NAMESPACE, LOC_TYPEDEF, + STRUCT_DOMAIN, LOC_TYPEDEF, &objfile->static_psymbols, nlist.n_value, 0, psymtab_language, objfile); @@ -1798,7 +1798,7 @@ read_dbx_symtab (struct objfile *objfile) { /* Also a typedef with the same name. */ add_psymbol_to_list (namestring, p - namestring, - VAR_NAMESPACE, LOC_TYPEDEF, + VAR_DOMAIN, LOC_TYPEDEF, &objfile->static_psymbols, nlist.n_value, 0, psymtab_language, objfile); @@ -1814,7 +1814,7 @@ read_dbx_symtab (struct objfile *objfile) // OBSOLETE { // OBSOLETE /* Also a typedef with the same name. */ // OBSOLETE add_psymbol_to_list (namestring, p - namestring, -// OBSOLETE VAR_NAMESPACE, LOC_TYPEDEF, +// OBSOLETE VAR_DOMAIN, LOC_TYPEDEF, // OBSOLETE &objfile->static_psymbols, // OBSOLETE nlist.n_value, 0, // OBSOLETE psymtab_language, objfile); @@ -1826,7 +1826,7 @@ read_dbx_symtab (struct objfile *objfile) if (p != namestring) /* a name is there, not just :T... */ { add_psymbol_to_list (namestring, p - namestring, - VAR_NAMESPACE, LOC_TYPEDEF, + VAR_DOMAIN, LOC_TYPEDEF, &objfile->static_psymbols, nlist.n_value, 0, psymtab_language, objfile); @@ -1888,7 +1888,7 @@ read_dbx_symtab (struct objfile *objfile) /* Note that the value doesn't matter for enum constants in psymtabs, just in symtabs. */ add_psymbol_to_list (p, q - p, - VAR_NAMESPACE, LOC_CONST, + VAR_DOMAIN, LOC_CONST, &objfile->static_psymbols, 0, 0, psymtab_language, objfile); /* Point past the name. */ @@ -1905,7 +1905,7 @@ read_dbx_symtab (struct objfile *objfile) case 'c': /* Constant, e.g. from "const" in Pascal. */ add_psymbol_to_list (namestring, p - namestring, - VAR_NAMESPACE, LOC_CONST, + VAR_DOMAIN, LOC_CONST, &objfile->static_psymbols, nlist.n_value, 0, psymtab_language, objfile); continue; @@ -1966,7 +1966,7 @@ read_dbx_symtab (struct objfile *objfile) textlow_not_set = 0; } add_psymbol_to_list (namestring, p - namestring, - VAR_NAMESPACE, LOC_BLOCK, + VAR_DOMAIN, LOC_BLOCK, &objfile->static_psymbols, 0, nlist.n_value, psymtab_language, objfile); @@ -2031,7 +2031,7 @@ read_dbx_symtab (struct objfile *objfile) textlow_not_set = 0; } add_psymbol_to_list (namestring, p - namestring, - VAR_NAMESPACE, LOC_BLOCK, + VAR_DOMAIN, LOC_BLOCK, &objfile->global_psymbols, 0, nlist.n_value, psymtab_language, objfile); diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 6359337..8f927f0 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -1503,7 +1503,7 @@ add_partial_symbol (struct partial_die_info *pdi, struct objfile *objfile, /*prim_record_minimal_symbol (pdi->name, pdi->lowpc + baseaddr, mst_text, objfile); */ add_psymbol_to_list (pdi->name, strlen (pdi->name), - VAR_NAMESPACE, LOC_BLOCK, + VAR_DOMAIN, LOC_BLOCK, &objfile->global_psymbols, 0, pdi->lowpc + baseaddr, cu_language, objfile); } @@ -1512,7 +1512,7 @@ add_partial_symbol (struct partial_die_info *pdi, struct objfile *objfile, /*prim_record_minimal_symbol (pdi->name, pdi->lowpc + baseaddr, mst_file_text, objfile); */ add_psymbol_to_list (pdi->name, strlen (pdi->name), - VAR_NAMESPACE, LOC_BLOCK, + VAR_DOMAIN, LOC_BLOCK, &objfile->static_psymbols, 0, pdi->lowpc + baseaddr, cu_language, objfile); } @@ -1537,7 +1537,7 @@ add_partial_symbol (struct partial_die_info *pdi, struct objfile *objfile, addr = decode_locdesc (pdi->locdesc, objfile, cu_header); if (pdi->locdesc || pdi->has_type) add_psymbol_to_list (pdi->name, strlen (pdi->name), - VAR_NAMESPACE, LOC_STATIC, + VAR_DOMAIN, LOC_STATIC, &objfile->global_psymbols, 0, addr + baseaddr, cu_language, objfile); } @@ -1550,7 +1550,7 @@ add_partial_symbol (struct partial_die_info *pdi, struct objfile *objfile, /*prim_record_minimal_symbol (pdi->name, addr + baseaddr, mst_file_data, objfile); */ add_psymbol_to_list (pdi->name, strlen (pdi->name), - VAR_NAMESPACE, LOC_STATIC, + VAR_DOMAIN, LOC_STATIC, &objfile->static_psymbols, 0, addr + baseaddr, cu_language, objfile); } @@ -1558,7 +1558,7 @@ add_partial_symbol (struct partial_die_info *pdi, struct objfile *objfile, case DW_TAG_typedef: case DW_TAG_base_type: add_psymbol_to_list (pdi->name, strlen (pdi->name), - VAR_NAMESPACE, LOC_TYPEDEF, + VAR_DOMAIN, LOC_TYPEDEF, &objfile->static_psymbols, 0, (CORE_ADDR) 0, cu_language, objfile); break; @@ -1571,7 +1571,7 @@ add_partial_symbol (struct partial_die_info *pdi, struct objfile *objfile, if (pdi->has_children == 0) return; add_psymbol_to_list (pdi->name, strlen (pdi->name), - STRUCT_NAMESPACE, LOC_TYPEDEF, + STRUCT_DOMAIN, LOC_TYPEDEF, &objfile->static_psymbols, 0, (CORE_ADDR) 0, cu_language, objfile); @@ -1579,14 +1579,14 @@ add_partial_symbol (struct partial_die_info *pdi, struct objfile *objfile, { /* For C++, these implicitly act as typedefs as well. */ add_psymbol_to_list (pdi->name, strlen (pdi->name), - VAR_NAMESPACE, LOC_TYPEDEF, + VAR_DOMAIN, LOC_TYPEDEF, &objfile->static_psymbols, 0, (CORE_ADDR) 0, cu_language, objfile); } break; case DW_TAG_enumerator: add_psymbol_to_list (pdi->name, strlen (pdi->name), - VAR_NAMESPACE, LOC_CONST, + VAR_DOMAIN, LOC_CONST, &objfile->static_psymbols, 0, (CORE_ADDR) 0, cu_language, objfile); break; @@ -5122,7 +5122,7 @@ new_symbol (struct die_info *die, struct type *type, struct objfile *objfile, /* Default assumptions. Use the passed type or decode it from the die. */ - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; SYMBOL_CLASS (sym) = LOC_STATIC; if (type != NULL) SYMBOL_TYPE (sym) = type; @@ -5252,7 +5252,7 @@ new_symbol (struct die_info *die, struct type *type, struct objfile *objfile, case DW_TAG_union_type: case DW_TAG_enumeration_type: SYMBOL_CLASS (sym) = LOC_TYPEDEF; - SYMBOL_NAMESPACE (sym) = STRUCT_NAMESPACE; + SYMBOL_DOMAIN (sym) = STRUCT_DOMAIN; add_symbol_to_list (sym, list_in_scope); /* The semantics of C++ state that "struct foo { ... }" also @@ -5264,7 +5264,7 @@ new_symbol (struct die_info *die, struct type *type, struct objfile *objfile, obstack_alloc (&objfile->symbol_obstack, sizeof (struct symbol)); *typedef_sym = *sym; - SYMBOL_NAMESPACE (typedef_sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (typedef_sym) = VAR_DOMAIN; if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0) TYPE_NAME (SYMBOL_TYPE (sym)) = obsavestring (DEPRECATED_SYMBOL_NAME (sym), @@ -5276,7 +5276,7 @@ new_symbol (struct die_info *die, struct type *type, struct objfile *objfile, case DW_TAG_typedef: case DW_TAG_base_type: SYMBOL_CLASS (sym) = LOC_TYPEDEF; - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; add_symbol_to_list (sym, list_in_scope); break; case DW_TAG_enumerator: diff --git a/gdb/dwarfread.c b/gdb/dwarfread.c index 40c89e3..bbfecbc 100644 --- a/gdb/dwarfread.c +++ b/gdb/dwarfread.c @@ -1589,7 +1589,7 @@ read_enumeration (struct dieinfo *dip, char *thisdie, char *enddie, of the enumeration and return a type pointer for the enumeration. At the same time, for each member of the enumeration, create a - symbol for it with namespace VAR_NAMESPACE and class LOC_CONST, + symbol for it with domain VAR_DOMAIN and class LOC_CONST, and give it the type of the enumeration itself. NOTES @@ -1679,7 +1679,7 @@ enum_type (struct dieinfo *dip, struct objfile *objfile) DEPRECATED_SYMBOL_NAME (sym) = create_name (list->field.name, &objfile->symbol_obstack); SYMBOL_INIT_LANGUAGE_SPECIFIC (sym, cu_language); - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; SYMBOL_CLASS (sym) = LOC_CONST; SYMBOL_TYPE (sym) = type; SYMBOL_VALUE (sym) = FIELD_BITPOS (list->field); @@ -2447,7 +2447,7 @@ add_enum_psymbol (struct dieinfo *dip, struct objfile *objfile) while (scan < listend) { scan += TARGET_FT_LONG_SIZE (objfile); - add_psymbol_to_list (scan, strlen (scan), VAR_NAMESPACE, LOC_CONST, + add_psymbol_to_list (scan, strlen (scan), VAR_DOMAIN, LOC_CONST, &objfile->static_psymbols, 0, 0, cu_language, objfile); scan += strlen (scan) + 1; @@ -2479,31 +2479,31 @@ add_partial_symbol (struct dieinfo *dip, struct objfile *objfile) { case TAG_global_subroutine: add_psymbol_to_list (dip->at_name, strlen (dip->at_name), - VAR_NAMESPACE, LOC_BLOCK, + VAR_DOMAIN, LOC_BLOCK, &objfile->global_psymbols, 0, dip->at_low_pc, cu_language, objfile); break; case TAG_global_variable: add_psymbol_to_list (dip->at_name, strlen (dip->at_name), - VAR_NAMESPACE, LOC_STATIC, + VAR_DOMAIN, LOC_STATIC, &objfile->global_psymbols, 0, 0, cu_language, objfile); break; case TAG_subroutine: add_psymbol_to_list (dip->at_name, strlen (dip->at_name), - VAR_NAMESPACE, LOC_BLOCK, + VAR_DOMAIN, LOC_BLOCK, &objfile->static_psymbols, 0, dip->at_low_pc, cu_language, objfile); break; case TAG_local_variable: add_psymbol_to_list (dip->at_name, strlen (dip->at_name), - VAR_NAMESPACE, LOC_STATIC, + VAR_DOMAIN, LOC_STATIC, &objfile->static_psymbols, 0, 0, cu_language, objfile); break; case TAG_typedef: add_psymbol_to_list (dip->at_name, strlen (dip->at_name), - VAR_NAMESPACE, LOC_TYPEDEF, + VAR_DOMAIN, LOC_TYPEDEF, &objfile->static_psymbols, 0, 0, cu_language, objfile); break; @@ -2515,14 +2515,14 @@ add_partial_symbol (struct dieinfo *dip, struct objfile *objfile) if (!dip->has_at_byte_size) break; add_psymbol_to_list (dip->at_name, strlen (dip->at_name), - STRUCT_NAMESPACE, LOC_TYPEDEF, + STRUCT_DOMAIN, LOC_TYPEDEF, &objfile->static_psymbols, 0, 0, cu_language, objfile); if (cu_language == language_cplus) { /* For C++, these implicitly act as typedefs as well. */ add_psymbol_to_list (dip->at_name, strlen (dip->at_name), - VAR_NAMESPACE, LOC_TYPEDEF, + VAR_DOMAIN, LOC_TYPEDEF, &objfile->static_psymbols, 0, 0, cu_language, objfile); } @@ -2821,7 +2821,7 @@ new_symbol (struct dieinfo *dip, struct objfile *objfile) OBJSTAT (objfile, n_syms++); memset (sym, 0, sizeof (struct symbol)); /* default assumptions */ - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; SYMBOL_CLASS (sym) = LOC_STATIC; SYMBOL_TYPE (sym) = decode_die_type (dip); @@ -2927,12 +2927,12 @@ new_symbol (struct dieinfo *dip, struct objfile *objfile) case TAG_union_type: case TAG_enumeration_type: SYMBOL_CLASS (sym) = LOC_TYPEDEF; - SYMBOL_NAMESPACE (sym) = STRUCT_NAMESPACE; + SYMBOL_DOMAIN (sym) = STRUCT_DOMAIN; add_symbol_to_list (sym, list_in_scope); break; case TAG_typedef: SYMBOL_CLASS (sym) = LOC_TYPEDEF; - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; add_symbol_to_list (sym, list_in_scope); break; default: @@ -2984,7 +2984,7 @@ synthesize_typedef (struct dieinfo *dip, struct objfile *objfile, SYMBOL_INIT_LANGUAGE_SPECIFIC (sym, cu_language); SYMBOL_TYPE (sym) = type; SYMBOL_CLASS (sym) = LOC_TYPEDEF; - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; add_symbol_to_list (sym, list_in_scope); } } diff --git a/gdb/f-exp.y b/gdb/f-exp.y index a9504c1..396b1db 100644 --- a/gdb/f-exp.y +++ b/gdb/f-exp.y @@ -1141,7 +1141,7 @@ yylex () int hextype; sym = lookup_symbol (tmp, expression_context_block, - VAR_NAMESPACE, + VAR_DOMAIN, current_language->la_language == language_cplus ? &is_a_field_of_this : NULL, NULL); diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 67567d9..3b8e62f 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -1058,7 +1058,7 @@ lookup_typename (char *name, struct block *block, int noerr) register struct symbol *sym; register struct type *tmp; - sym = lookup_symbol (name, block, VAR_NAMESPACE, 0, (struct symtab **) NULL); + sym = lookup_symbol (name, block, VAR_DOMAIN, 0, (struct symtab **) NULL); if (sym == NULL || SYMBOL_CLASS (sym) != LOC_TYPEDEF) { tmp = lookup_primitive_typename (name); @@ -1111,7 +1111,7 @@ lookup_struct (char *name, struct block *block) { register struct symbol *sym; - sym = lookup_symbol (name, block, STRUCT_NAMESPACE, 0, + sym = lookup_symbol (name, block, STRUCT_DOMAIN, 0, (struct symtab **) NULL); if (sym == NULL) @@ -1134,7 +1134,7 @@ lookup_union (char *name, struct block *block) register struct symbol *sym; struct type *t; - sym = lookup_symbol (name, block, STRUCT_NAMESPACE, 0, + sym = lookup_symbol (name, block, STRUCT_DOMAIN, 0, (struct symtab **) NULL); if (sym == NULL) @@ -1165,7 +1165,7 @@ lookup_enum (char *name, struct block *block) { register struct symbol *sym; - sym = lookup_symbol (name, block, STRUCT_NAMESPACE, 0, + sym = lookup_symbol (name, block, STRUCT_DOMAIN, 0, (struct symtab **) NULL); if (sym == NULL) { @@ -1191,7 +1191,7 @@ lookup_template_type (char *name, struct type *type, struct block *block) strcat (nam, TYPE_NAME (type)); strcat (nam, " >"); /* FIXME, extra space still introduced in gcc? */ - sym = lookup_symbol (nam, block, VAR_NAMESPACE, 0, (struct symtab **) NULL); + sym = lookup_symbol (nam, block, VAR_DOMAIN, 0, (struct symtab **) NULL); if (sym == NULL) { @@ -1386,7 +1386,7 @@ check_typedef (struct type *type) name = type_name_no_tag (type); /* FIXME: shouldn't we separately check the TYPE_NAME and the - TYPE_TAG_NAME, and look in STRUCT_NAMESPACE and/or VAR_NAMESPACE + TYPE_TAG_NAME, and look in STRUCT_DOMAIN and/or VAR_DOMAIN as appropriate? (this code was written before TYPE_NAME and TYPE_TAG_NAME were separate). */ if (name == NULL) @@ -1394,7 +1394,7 @@ check_typedef (struct type *type) stub_noname_complaint (); return type; } - sym = lookup_symbol (name, 0, STRUCT_NAMESPACE, 0, + sym = lookup_symbol (name, 0, STRUCT_DOMAIN, 0, (struct symtab **) NULL); if (sym) TYPE_TARGET_TYPE (type) = SYMBOL_TYPE (sym); @@ -1430,7 +1430,7 @@ check_typedef (struct type *type) { char *name = type_name_no_tag (type); /* FIXME: shouldn't we separately check the TYPE_NAME and the - TYPE_TAG_NAME, and look in STRUCT_NAMESPACE and/or VAR_NAMESPACE + TYPE_TAG_NAME, and look in STRUCT_DOMAIN and/or VAR_DOMAIN as appropriate? (this code was written before TYPE_NAME and TYPE_TAG_NAME were separate). */ struct symbol *sym; @@ -1439,7 +1439,7 @@ check_typedef (struct type *type) stub_noname_complaint (); return type; } - sym = lookup_symbol (name, 0, STRUCT_NAMESPACE, 0, (struct symtab **) NULL); + sym = lookup_symbol (name, 0, STRUCT_DOMAIN, 0, (struct symtab **) NULL); if (sym) make_cv_type (is_const, is_volatile, SYMBOL_TYPE (sym), &type); } diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 2d2561e..847e23a 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -281,7 +281,7 @@ struct main_type /* Name of this type, or NULL if none. This is used for printing only, except by poorly designed C++ code. - For looking up a name, look for a symbol in the VAR_NAMESPACE. */ + For looking up a name, look for a symbol in the VAR_DOMAIN. */ char *name; @@ -292,7 +292,7 @@ struct main_type with this feature. This is used for printing only, except by poorly designed C++ code. - For looking up a name, look for a symbol in the STRUCT_NAMESPACE. + For looking up a name, look for a symbol in the STRUCT_DOMAIN. One more legitimate use is that if TYPE_FLAG_STUB is set, this is the name to use to look for definitions in other files. */ diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c index 7e66ee9..da2a2d6 100644 --- a/gdb/gnu-v3-abi.c +++ b/gdb/gnu-v3-abi.c @@ -255,7 +255,7 @@ gnuv3_rtti_type (struct value *value, class_name = vtable_symbol_name + 11; /* Try to look up the class name as a type name. */ - class_symbol = lookup_symbol (class_name, 0, STRUCT_NAMESPACE, 0, 0); + class_symbol = lookup_symbol (class_name, 0, STRUCT_DOMAIN, 0, 0); if (! class_symbol) { warning ("can't find class named `%s', as given by C++ RTTI", class_name); diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index d524bae..440f4c5 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -1973,10 +1973,10 @@ find_stub_with_shl_get (struct minimal_symbol *function, CORE_ADDR handle) args = alloca (sizeof (struct value *) * 8); /* 6 for the arguments and one null one??? */ funcval = find_function_in_inferior ("__d_shl_get"); - get_sym = lookup_symbol ("__d_shl_get", NULL, VAR_NAMESPACE, NULL, NULL); + get_sym = lookup_symbol ("__d_shl_get", NULL, VAR_DOMAIN, NULL, NULL); buff_minsym = lookup_minimal_symbol ("__buffer", NULL, NULL); msymbol = lookup_minimal_symbol ("__shldp", NULL, NULL); - symbol2 = lookup_symbol ("__shldp", NULL, VAR_NAMESPACE, NULL, NULL); + symbol2 = lookup_symbol ("__shldp", NULL, VAR_DOMAIN, NULL, NULL); endo_buff_addr = SYMBOL_VALUE_ADDRESS (buff_minsym); namelen = strlen (DEPRECATED_SYMBOL_NAME (function)); value_return_addr = endo_buff_addr + namelen; @@ -4345,7 +4345,7 @@ initialize_hp_cxx_exception_support (void) /* Next look for the catch enable flag provided in end.o */ sym = lookup_symbol (HP_ACC_EH_catch_catch, (struct block *) NULL, - VAR_NAMESPACE, 0, (struct symtab **) NULL); + VAR_DOMAIN, 0, (struct symtab **) NULL); if (sym) /* sometimes present in debug info */ { eh_catch_catch_addr = SYMBOL_VALUE_ADDRESS (sym); @@ -4371,7 +4371,7 @@ initialize_hp_cxx_exception_support (void) /* Next look for the catch enable flag provided end.o */ sym = lookup_symbol (HP_ACC_EH_catch_catch, (struct block *) NULL, - VAR_NAMESPACE, 0, (struct symtab **) NULL); + VAR_DOMAIN, 0, (struct symtab **) NULL); if (sym) /* sometimes present in debug info */ { eh_catch_throw_addr = SYMBOL_VALUE_ADDRESS (sym); diff --git a/gdb/hpread.c b/gdb/hpread.c index 606ccfe..958507f 100644 --- a/gdb/hpread.c +++ b/gdb/hpread.c @@ -789,7 +789,7 @@ scan_procs (int *curr_pd_p, quick_procedure_entry *qPD, int max_procs, strlen (rtn_name), rtn_dem_name, strlen (rtn_dem_name), - VAR_NAMESPACE, + VAR_DOMAIN, LOC_BLOCK, /* "I am a routine" */ &objfile->global_psymbols, (qPD[curr_pd].adrStart + /* Starting address of rtn */ @@ -802,7 +802,7 @@ scan_procs (int *curr_pd_p, quick_procedure_entry *qPD, int max_procs, strlen (rtn_name), rtn_dem_name, strlen (rtn_dem_name), - VAR_NAMESPACE, + VAR_DOMAIN, LOC_BLOCK, /* "I am a routine" */ &objfile->static_psymbols, (qPD[curr_pd].adrStart + /* Starting address of rtn */ @@ -2061,12 +2061,12 @@ hpread_build_psymtabs (struct objfile *objfile, int mainline) set_namestring (dn_bufp, &namestring, objfile); if (dn_bufp->dfunc.global) add_psymbol_to_list (namestring, strlen (namestring), - VAR_NAMESPACE, LOC_BLOCK, + VAR_DOMAIN, LOC_BLOCK, &objfile->global_psymbols, valu, 0, language_unknown, objfile); else add_psymbol_to_list (namestring, strlen (namestring), - VAR_NAMESPACE, LOC_BLOCK, + VAR_DOMAIN, LOC_BLOCK, &objfile->static_psymbols, valu, 0, language_unknown, objfile); within_function = 1; @@ -2082,12 +2082,12 @@ hpread_build_psymtabs (struct objfile *objfile, int mainline) set_namestring (dn_bufp, &namestring, objfile); if (dn_bufp->ddocfunc.global) add_psymbol_to_list (namestring, strlen (namestring), - VAR_NAMESPACE, LOC_BLOCK, + VAR_DOMAIN, LOC_BLOCK, &objfile->global_psymbols, valu, 0, language_unknown, objfile); else add_psymbol_to_list (namestring, strlen (namestring), - VAR_NAMESPACE, LOC_BLOCK, + VAR_DOMAIN, LOC_BLOCK, &objfile->static_psymbols, valu, 0, language_unknown, objfile); within_function = 1; @@ -2128,7 +2128,7 @@ hpread_build_psymtabs (struct objfile *objfile, int mainline) { /* Variables, typedefs an the like. */ enum address_class storage; - namespace_enum namespace; + domain_enum domain; /* Don't add locals to the partial symbol table. */ if (within_function @@ -2136,11 +2136,11 @@ hpread_build_psymtabs (struct objfile *objfile, int mainline) || dn_bufp->dblock.kind == DNTT_TYPE_DVAR)) continue; - /* TAGDEFs go into the structure namespace. */ + /* TAGDEFs go into the structure domain. */ if (dn_bufp->dblock.kind == DNTT_TYPE_TAGDEF) - namespace = STRUCT_NAMESPACE; + domain = STRUCT_DOMAIN; else - namespace = VAR_NAMESPACE; + domain = VAR_DOMAIN; /* What kind of "storage" does this use? */ if (dn_bufp->dblock.kind == DNTT_TYPE_SVAR) @@ -2178,7 +2178,7 @@ hpread_build_psymtabs (struct objfile *objfile, int mainline) if (dn_bufp->dsvar.global) { add_psymbol_to_list (namestring, strlen (namestring), - namespace, storage, + domain, storage, &objfile->global_psymbols, valu, 0, language_unknown, objfile); @@ -2186,18 +2186,18 @@ hpread_build_psymtabs (struct objfile *objfile, int mainline) else { add_psymbol_to_list (namestring, strlen (namestring), - namespace, storage, + domain, storage, &objfile->static_psymbols, valu, 0, language_unknown, objfile); } /* For TAGDEF's, the above code added the tagname to the - struct namespace. This will cause tag "t" to be found + struct domain. This will cause tag "t" to be found on a reference of the form "(struct t) x". But for C++ classes, "t" will also be a typename, which we want to find on a reference of the form "ptype t". - Therefore, we also add "t" to the var namespace. + Therefore, we also add "t" to the var domain. Do the same for enum's due to the way aCC generates debug info for these (see more extended comment in hp-symtab-read.c). @@ -2216,7 +2216,7 @@ hpread_build_psymtabs (struct objfile *objfile, int mainline) if (global) { add_psymbol_to_list (namestring, strlen (namestring), - VAR_NAMESPACE, storage, + VAR_DOMAIN, storage, &objfile->global_psymbols, dn_bufp->dsvar.location, 0, language_unknown, objfile); @@ -2224,7 +2224,7 @@ hpread_build_psymtabs (struct objfile *objfile, int mainline) else { add_psymbol_to_list (namestring, strlen (namestring), - VAR_NAMESPACE, storage, + VAR_DOMAIN, storage, &objfile->static_psymbols, dn_bufp->dsvar.location, 0, language_unknown, objfile); @@ -2249,12 +2249,12 @@ hpread_build_psymtabs (struct objfile *objfile, int mainline) } if (dn_bufp->dconst.global) add_psymbol_to_list (namestring, strlen (namestring), - VAR_NAMESPACE, LOC_CONST, + VAR_DOMAIN, LOC_CONST, &objfile->global_psymbols, 0, 0, language_unknown, objfile); else add_psymbol_to_list (namestring, strlen (namestring), - VAR_NAMESPACE, LOC_CONST, + VAR_DOMAIN, LOC_CONST, &objfile->static_psymbols, 0, 0, language_unknown, objfile); continue; @@ -3133,7 +3133,7 @@ hpread_read_enum_type (dnttpointer hp_type, union dnttentry *dn_bufp, DEPRECATED_SYMBOL_NAME (sym) = obsavestring (name, strlen (name), &objfile->symbol_obstack); SYMBOL_CLASS (sym) = LOC_CONST; - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; SYMBOL_VALUE (sym) = memp->dmember.value; add_symbol_to_list (sym, symlist); nsyms++; @@ -3248,7 +3248,7 @@ hpread_read_function_type (dnttpointer hp_type, union dnttentry *dn_bufp, SYMBOL_CLASS (sym) = LOC_REF_ARG; else SYMBOL_CLASS (sym) = LOC_ARG; - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; if (paramp->dfparam.copyparam) { SYMBOL_VALUE (sym) = paramp->dfparam.location; @@ -3427,7 +3427,7 @@ hpread_read_doc_function_type (dnttpointer hp_type, union dnttentry *dn_bufp, SYMBOL_CLASS (sym) = LOC_REF_ARG; else SYMBOL_CLASS (sym) = LOC_ARG; - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; if (paramp->dfparam.copyparam) { SYMBOL_VALUE (sym) = paramp->dfparam.location; @@ -5100,7 +5100,7 @@ hpread_process_one_debug_symbol (union dnttentry *dn_bufp, char *name, memset (sym, 0, sizeof (struct symbol)); DEPRECATED_SYMBOL_NAME (sym) = obsavestring (name, strlen (name), &objfile->symbol_obstack); SYMBOL_LANGUAGE (sym) = language_auto; - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; SYMBOL_LINE (sym) = 0; SYMBOL_VALUE (sym) = 0; SYMBOL_CLASS (sym) = LOC_TYPEDEF; @@ -5660,7 +5660,7 @@ hpread_process_one_debug_symbol (union dnttentry *dn_bufp, char *name, /* DNTT_TYPE_IMPORT is not handled */ case DNTT_TYPE_LABEL: - SYMBOL_NAMESPACE (sym) = LABEL_NAMESPACE; + SYMBOL_DOMAIN (sym) = LABEL_DOMAIN; break; case DNTT_TYPE_FPARAM: @@ -5695,7 +5695,7 @@ hpread_process_one_debug_symbol (union dnttentry *dn_bufp, char *name, SYMBOL_CLASS (sym) = LOC_REF_ARG; else SYMBOL_CLASS (sym) = LOC_ARG; - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; if (dn_bufp->dfparam.copyparam) { SYMBOL_VALUE (sym) = dn_bufp->dfparam.location; @@ -5811,9 +5811,9 @@ hpread_process_one_debug_symbol (union dnttentry *dn_bufp, char *name, case DNTT_TYPE_TYPEDEF: /* A typedef. We do want to process these, since a name is - * added to the namespace for the typedef'ed name. + * added to the domain for the typedef'ed name. */ - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; SYMBOL_TYPE (sym) = hpread_type_lookup (dn_bufp->dtype.type, objfile); if (dn_bufp->dtype.global) add_symbol_to_list (sym, &global_symbols); @@ -5828,10 +5828,10 @@ hpread_process_one_debug_symbol (union dnttentry *dn_bufp, char *name, int global = dn_bufp->dtag.global; /* Structure, union, enum, template, or class tag definition */ /* We do want to process these, since a name is - * added to the namespace for the tag name (and if C++ class, + * added to the domain for the tag name (and if C++ class, * for the typename also). */ - SYMBOL_NAMESPACE (sym) = STRUCT_NAMESPACE; + SYMBOL_DOMAIN (sym) = STRUCT_DOMAIN; /* The tag contains in its "type" field a pointer to the * DNTT_TYPE_STRUCT, DNTT_TYPE_UNION, DNTT_TYPE_ENUM, @@ -5888,7 +5888,7 @@ hpread_process_one_debug_symbol (union dnttentry *dn_bufp, char *name, memset (newsym, 0, sizeof (struct symbol)); DEPRECATED_SYMBOL_NAME (newsym) = name; SYMBOL_LANGUAGE (newsym) = language_auto; - SYMBOL_NAMESPACE (newsym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (newsym) = VAR_DOMAIN; SYMBOL_LINE (newsym) = 0; SYMBOL_VALUE (newsym) = 0; SYMBOL_CLASS (newsym) = LOC_TYPEDEF; diff --git a/gdb/jv-exp.y b/gdb/jv-exp.y index 565881d..7fe020d 100644 --- a/gdb/jv-exp.y +++ b/gdb/jv-exp.y @@ -1235,7 +1235,7 @@ push_variable (name) char *tmp = copy_name (name); int is_a_field_of_this = 0; struct symbol *sym; - sym = lookup_symbol (tmp, expression_context_block, VAR_NAMESPACE, + sym = lookup_symbol (tmp, expression_context_block, VAR_DOMAIN, &is_a_field_of_this, (struct symtab **) NULL); if (sym && SYMBOL_CLASS (sym) != LOC_TYPEDEF) { diff --git a/gdb/jv-lang.c b/gdb/jv-lang.c index a44452b..e436094 100644 --- a/gdb/jv-lang.c +++ b/gdb/jv-lang.c @@ -170,7 +170,7 @@ add_class_symbol (struct type *type, CORE_ADDR addr) SYMBOL_CLASS (sym) = LOC_TYPEDEF; /* SYMBOL_VALUE (sym) = valu; */ SYMBOL_TYPE (sym) = type; - SYMBOL_NAMESPACE (sym) = STRUCT_NAMESPACE; + SYMBOL_DOMAIN (sym) = STRUCT_DOMAIN; SYMBOL_VALUE_ADDRESS (sym) = addr; return sym; } @@ -180,7 +180,7 @@ struct type * java_lookup_class (char *name) { struct symbol *sym; - sym = lookup_symbol (name, expression_context_block, STRUCT_NAMESPACE, + sym = lookup_symbol (name, expression_context_block, STRUCT_DOMAIN, (int *) 0, (struct symtab **) NULL); if (sym != NULL) return SYMBOL_TYPE (sym); @@ -588,7 +588,7 @@ get_java_object_type (void) if (java_object_type == NULL) { struct symbol *sym; - sym = lookup_symbol ("java.lang.Object", NULL, STRUCT_NAMESPACE, + sym = lookup_symbol ("java.lang.Object", NULL, STRUCT_DOMAIN, (int *) 0, (struct symtab **) NULL); if (sym == NULL) error ("cannot find java.lang.Object"); diff --git a/gdb/language.c b/gdb/language.c index 0a65094..2613633 100644 --- a/gdb/language.c +++ b/gdb/language.c @@ -935,7 +935,7 @@ lang_bool_type (void) switch (current_language->la_language) { case language_fortran: - sym = lookup_symbol ("logical", NULL, VAR_NAMESPACE, NULL, NULL); + sym = lookup_symbol ("logical", NULL, VAR_DOMAIN, NULL, NULL); if (sym) { type = SYMBOL_TYPE (sym); @@ -946,9 +946,9 @@ lang_bool_type (void) case language_cplus: case language_pascal: if (current_language->la_language==language_cplus) - {sym = lookup_symbol ("bool", NULL, VAR_NAMESPACE, NULL, NULL);} + {sym = lookup_symbol ("bool", NULL, VAR_DOMAIN, NULL, NULL);} else - {sym = lookup_symbol ("boolean", NULL, VAR_NAMESPACE, NULL, NULL);} + {sym = lookup_symbol ("boolean", NULL, VAR_DOMAIN, NULL, NULL);} if (sym) { type = SYMBOL_TYPE (sym); @@ -957,7 +957,7 @@ lang_bool_type (void) } return builtin_type_bool; case language_java: - sym = lookup_symbol ("boolean", NULL, VAR_NAMESPACE, NULL, NULL); + sym = lookup_symbol ("boolean", NULL, VAR_DOMAIN, NULL, NULL); if (sym) { type = SYMBOL_TYPE (sym); diff --git a/gdb/linespec.c b/gdb/linespec.c index ea52a80..bda41c7 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -194,7 +194,7 @@ find_methods (struct type *t, char *name, struct symbol **sym_arr) the class, then the loop can't do any good. */ if (class_name && (lookup_symbol (class_name, (struct block *) NULL, - STRUCT_NAMESPACE, (int *) NULL, + STRUCT_DOMAIN, (int *) NULL, (struct symtab **) NULL))) { int method_counter; @@ -255,7 +255,7 @@ find_methods (struct type *t, char *name, struct symbol **sym_arr) continue; sym_arr[i1] = lookup_symbol (phys_name, - NULL, VAR_NAMESPACE, + NULL, VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL); if (sym_arr[i1]) @@ -301,7 +301,7 @@ find_methods (struct type *t, char *name, struct symbol **sym_arr) /* If this method is actually defined, include it in the list. */ sym_arr[i1] = lookup_symbol (phys_name, - NULL, VAR_NAMESPACE, + NULL, VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL); if (sym_arr[i1]) @@ -682,7 +682,7 @@ decode_line_1 (char **argptr, int funfirstline, struct symtab *default_symtab, copy = (char *) alloca (p - *argptr + 1); memcpy (copy, *argptr, p - *argptr); copy[p - *argptr] = '\000'; - sym = lookup_symbol (copy, 0, VAR_NAMESPACE, 0, &sym_symtab); + sym = lookup_symbol (copy, 0, VAR_DOMAIN, 0, &sym_symtab); if (sym) { *argptr = (*p == '\'') ? p + 1 : p; @@ -1214,7 +1214,7 @@ decode_compound (char **argptr, int funfirstline, char ***canonical, /* Set argptr to skip over the name. */ *argptr = (*p == '\'') ? p + 1 : p; /* Look up entire name */ - sym = lookup_symbol (copy, 0, VAR_NAMESPACE, 0, &sym_symtab); + sym = lookup_symbol (copy, 0, VAR_DOMAIN, 0, &sym_symtab); if (sym) return symbol_found (funfirstline, canonical, copy, sym, NULL, sym_symtab); @@ -1253,7 +1253,7 @@ lookup_prefix_sym (char **argptr, char *p) p++; *argptr = p; - return lookup_symbol (copy, 0, STRUCT_NAMESPACE, 0, + return lookup_symbol (copy, 0, STRUCT_DOMAIN, 0, (struct symtab **) NULL); } @@ -1343,7 +1343,7 @@ collect_methods (char *copy, struct type *t, sym_arr[i1] = lookup_symbol (TYPE_FN_FIELD_PHYSNAME (f, f_index), - NULL, VAR_NAMESPACE, (int *) NULL, + NULL, VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL); if (sym_arr[i1]) i1++; @@ -1521,7 +1521,7 @@ decode_dollar (char *copy, int funfirstline, struct symtab *default_symtab, convenience variable. */ /* Look up entire name as a symbol first. */ - sym = lookup_symbol (copy, 0, VAR_NAMESPACE, 0, &sym_symtab); + sym = lookup_symbol (copy, 0, VAR_DOMAIN, 0, &sym_symtab); file_symtab = (struct symtab *) 0; need_canonical = 1; /* Symbol was found --> jump to normal symbol processing. */ @@ -1579,7 +1579,7 @@ decode_variable (char *copy, int funfirstline, char ***canonical, ? BLOCKVECTOR_BLOCK (BLOCKVECTOR (file_symtab), STATIC_BLOCK) : get_selected_block (0)), - VAR_NAMESPACE, 0, &sym_symtab); + VAR_DOMAIN, 0, &sym_symtab); if (sym != NULL) return symbol_found (funfirstline, canonical, copy, sym, @@ -1631,7 +1631,7 @@ symbol_found (int funfirstline, char ***canonical, char *copy, { struct blockvector *bv = BLOCKVECTOR (sym_symtab); struct block *b = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); - if (lookup_block_symbol (b, copy, NULL, VAR_NAMESPACE) != NULL) + if (lookup_block_symbol (b, copy, NULL, VAR_DOMAIN) != NULL) build_canonical_line_spec (values.sals, copy, canonical); } return values; diff --git a/gdb/m2-exp.y b/gdb/m2-exp.y index b318bcc..37cf694 100644 --- a/gdb/m2-exp.y +++ b/gdb/m2-exp.y @@ -541,7 +541,7 @@ block : fblock fblock : BLOCKNAME { struct symbol *sym = lookup_symbol (copy_name ($1), expression_context_block, - VAR_NAMESPACE, 0, NULL); + VAR_DOMAIN, 0, NULL); $$ = sym;} ; @@ -550,7 +550,7 @@ fblock : BLOCKNAME fblock : block COLONCOLON BLOCKNAME { struct symbol *tem = lookup_symbol (copy_name ($3), $1, - VAR_NAMESPACE, 0, NULL); + VAR_DOMAIN, 0, NULL); if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK) error ("No function \"%s\" in specified context.", copy_name ($3)); @@ -574,7 +574,7 @@ variable: INTERNAL_VAR variable: block COLONCOLON NAME { struct symbol *sym; sym = lookup_symbol (copy_name ($3), $1, - VAR_NAMESPACE, 0, NULL); + VAR_DOMAIN, 0, NULL); if (sym == 0) error ("No symbol \"%s\" in specified context.", copy_name ($3)); @@ -593,7 +593,7 @@ variable: NAME sym = lookup_symbol (copy_name ($1), expression_context_block, - VAR_NAMESPACE, + VAR_DOMAIN, &is_a_field_of_this, NULL); if (sym) @@ -1018,7 +1018,7 @@ yylex () if (lookup_partial_symtab (tmp)) return BLOCKNAME; sym = lookup_symbol (tmp, expression_context_block, - VAR_NAMESPACE, 0, NULL); + VAR_DOMAIN, 0, NULL); if (sym && SYMBOL_CLASS (sym) == LOC_BLOCK) return BLOCKNAME; if (lookup_typename (copy_name (yylval.sval), expression_context_block, 1)) diff --git a/gdb/m3-nat.c b/gdb/m3-nat.c index 93ef57a..9e3f93b 100644 --- a/gdb/m3-nat.c +++ b/gdb/m3-nat.c @@ -2434,7 +2434,7 @@ // OBSOLETE // OBSOLETE sym = lookup_symbol (name, // OBSOLETE (struct block *) NULL, -// OBSOLETE VAR_NAMESPACE, +// OBSOLETE VAR_DOMAIN, // OBSOLETE (int *) NULL, // OBSOLETE (struct symtab **) NULL); // OBSOLETE diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c index 84b1afa..379a363 100644 --- a/gdb/mdebugread.c +++ b/gdb/mdebugread.c @@ -295,7 +295,7 @@ static struct blockvector *new_bvect (int); static struct type *parse_type (int, union aux_ext *, unsigned int, int *, int, char *); -static struct symbol *mylookup_symbol (char *, struct block *, namespace_enum, +static struct symbol *mylookup_symbol (char *, struct block *, domain_enum, enum address_class); static struct block *shrink_block (struct block *, struct symtab *); @@ -691,7 +691,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend, SYMBOL_VALUE (s) = svalue; data: /* Common code for symbols describing data */ - SYMBOL_NAMESPACE (s) = VAR_NAMESPACE; + SYMBOL_DOMAIN (s) = VAR_DOMAIN; SYMBOL_CLASS (s) = class; add_symbol (s, b); @@ -714,7 +714,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend, name = "this"; /* FIXME, not alloc'd in obstack */ s = new_symbol (name); - SYMBOL_NAMESPACE (s) = VAR_NAMESPACE; + SYMBOL_DOMAIN (s) = VAR_DOMAIN; switch (sh->sc) { case scRegister: @@ -743,7 +743,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend, case stLabel: /* label, goes into current block */ s = new_symbol (name); - SYMBOL_NAMESPACE (s) = VAR_NAMESPACE; /* so that it can be used */ + SYMBOL_DOMAIN (s) = VAR_DOMAIN; /* so that it can be used */ SYMBOL_CLASS (s) = LOC_LABEL; /* but not misused */ SYMBOL_VALUE_ADDRESS (s) = (CORE_ADDR) sh->value; SYMBOL_TYPE (s) = mdebug_type_int; @@ -785,7 +785,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend, break; } s = new_symbol (name); - SYMBOL_NAMESPACE (s) = VAR_NAMESPACE; + SYMBOL_DOMAIN (s) = VAR_DOMAIN; SYMBOL_CLASS (s) = LOC_BLOCK; /* Type of the return value */ if (SC_IS_UNDEF (sh->sc) || sh->sc == scNil) @@ -1111,7 +1111,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend, ¤t_objfile->symbol_obstack); SYMBOL_CLASS (enum_sym) = LOC_CONST; SYMBOL_TYPE (enum_sym) = t; - SYMBOL_NAMESPACE (enum_sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (enum_sym) = VAR_DOMAIN; SYMBOL_VALUE (enum_sym) = tsym.value; if (SYMBOL_VALUE (enum_sym) < 0) unsigned_enum = 0; @@ -1141,7 +1141,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend, } s = new_symbol (name); - SYMBOL_NAMESPACE (s) = STRUCT_NAMESPACE; + SYMBOL_DOMAIN (s) = STRUCT_DOMAIN; SYMBOL_CLASS (s) = LOC_TYPEDEF; SYMBOL_VALUE (s) = 0; SYMBOL_TYPE (s) = t; @@ -1197,7 +1197,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend, /* Make up special symbol to contain procedure specific info */ s = new_symbol (MIPS_EFI_SYMBOL_NAME); - SYMBOL_NAMESPACE (s) = LABEL_NAMESPACE; + SYMBOL_DOMAIN (s) = LABEL_DOMAIN; SYMBOL_CLASS (s) = LOC_CONST; SYMBOL_TYPE (s) = mdebug_type_void; e = ((struct mips_extra_func_info *) @@ -1342,7 +1342,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend, if (has_opaque_xref (cur_fdr, sh)) break; s = new_symbol (name); - SYMBOL_NAMESPACE (s) = VAR_NAMESPACE; + SYMBOL_DOMAIN (s) = VAR_DOMAIN; SYMBOL_CLASS (s) = LOC_TYPEDEF; SYMBOL_BLOCK_VALUE (s) = top_stack->cur_block; SYMBOL_TYPE (s) = t; @@ -1925,19 +1925,19 @@ parse_procedure (PDR *pr, struct symtab *search_symtab, the same name exists, lookup_symbol will eventually read in the symtab for the global function and clobber cur_fdr. */ FDR *save_cur_fdr = cur_fdr; - s = lookup_symbol (sh_name, NULL, VAR_NAMESPACE, 0, NULL); + s = lookup_symbol (sh_name, NULL, VAR_DOMAIN, 0, NULL); cur_fdr = save_cur_fdr; #else s = mylookup_symbol (sh_name, BLOCKVECTOR_BLOCK (BLOCKVECTOR (search_symtab), STATIC_BLOCK), - VAR_NAMESPACE, + VAR_DOMAIN, LOC_BLOCK); #endif } else s = mylookup_symbol (sh_name, top_stack->cur_block, - VAR_NAMESPACE, LOC_BLOCK); + VAR_DOMAIN, LOC_BLOCK); if (s != 0) { @@ -1951,7 +1951,7 @@ parse_procedure (PDR *pr, struct symtab *search_symtab, #else /* FIXME -- delete. We can't do symbol allocation now; it's all done. */ s = new_symbol (sh_name); - SYMBOL_NAMESPACE (s) = VAR_NAMESPACE; + SYMBOL_DOMAIN (s) = VAR_DOMAIN; SYMBOL_CLASS (s) = LOC_BLOCK; /* Donno its type, hope int is ok */ SYMBOL_TYPE (s) = lookup_function_type (mdebug_type_int); @@ -1969,7 +1969,7 @@ parse_procedure (PDR *pr, struct symtab *search_symtab, #endif } - i = mylookup_symbol (MIPS_EFI_SYMBOL_NAME, b, LABEL_NAMESPACE, LOC_CONST); + i = mylookup_symbol (MIPS_EFI_SYMBOL_NAME, b, LABEL_DOMAIN, LOC_CONST); if (i) { @@ -3001,7 +3001,7 @@ parse_partial_symbols (struct objfile *objfile) namestring = STATIC_TRANSFORM_NAME (namestring); #endif add_psymbol_to_list (namestring, p - namestring, - VAR_NAMESPACE, LOC_STATIC, + VAR_DOMAIN, LOC_STATIC, &objfile->static_psymbols, 0, sh.value, psymtab_language, objfile); @@ -3011,7 +3011,7 @@ parse_partial_symbols (struct objfile *objfile) /* The addresses in these entries are reported to be wrong. See the code that reads 'G's for symtabs. */ add_psymbol_to_list (namestring, p - namestring, - VAR_NAMESPACE, LOC_STATIC, + VAR_DOMAIN, LOC_STATIC, &objfile->global_psymbols, 0, sh.value, psymtab_language, objfile); @@ -3029,7 +3029,7 @@ parse_partial_symbols (struct objfile *objfile) && namestring[0] != ' ')) { add_psymbol_to_list (namestring, p - namestring, - STRUCT_NAMESPACE, LOC_TYPEDEF, + STRUCT_DOMAIN, LOC_TYPEDEF, &objfile->static_psymbols, sh.value, 0, psymtab_language, objfile); @@ -3037,7 +3037,7 @@ parse_partial_symbols (struct objfile *objfile) { /* Also a typedef with the same name. */ add_psymbol_to_list (namestring, p - namestring, - VAR_NAMESPACE, LOC_TYPEDEF, + VAR_DOMAIN, LOC_TYPEDEF, &objfile->static_psymbols, sh.value, 0, psymtab_language, objfile); @@ -3053,7 +3053,7 @@ parse_partial_symbols (struct objfile *objfile) // OBSOLETE { // OBSOLETE /* Also a typedef with the same name. */ // OBSOLETE add_psymbol_to_list (namestring, p - namestring, -// OBSOLETE VAR_NAMESPACE, LOC_TYPEDEF, +// OBSOLETE VAR_DOMAIN, LOC_TYPEDEF, // OBSOLETE &objfile->static_psymbols, // OBSOLETE sh.value, 0, // OBSOLETE psymtab_language, objfile); @@ -3065,7 +3065,7 @@ parse_partial_symbols (struct objfile *objfile) if (p != namestring) /* a name is there, not just :T... */ { add_psymbol_to_list (namestring, p - namestring, - VAR_NAMESPACE, LOC_TYPEDEF, + VAR_DOMAIN, LOC_TYPEDEF, &objfile->static_psymbols, sh.value, 0, psymtab_language, objfile); @@ -3127,7 +3127,7 @@ parse_partial_symbols (struct objfile *objfile) /* Note that the value doesn't matter for enum constants in psymtabs, just in symtabs. */ add_psymbol_to_list (p, q - p, - VAR_NAMESPACE, LOC_CONST, + VAR_DOMAIN, LOC_CONST, &objfile->static_psymbols, 0, 0, psymtab_language, objfile); /* Point past the name. */ @@ -3144,7 +3144,7 @@ parse_partial_symbols (struct objfile *objfile) case 'c': /* Constant, e.g. from "const" in Pascal. */ add_psymbol_to_list (namestring, p - namestring, - VAR_NAMESPACE, LOC_CONST, + VAR_DOMAIN, LOC_CONST, &objfile->static_psymbols, sh.value, 0, psymtab_language, objfile); continue; @@ -3161,7 +3161,7 @@ parse_partial_symbols (struct objfile *objfile) } sh.value += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); add_psymbol_to_list (namestring, p - namestring, - VAR_NAMESPACE, LOC_BLOCK, + VAR_DOMAIN, LOC_BLOCK, &objfile->static_psymbols, 0, sh.value, psymtab_language, objfile); @@ -3182,7 +3182,7 @@ parse_partial_symbols (struct objfile *objfile) } sh.value += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); add_psymbol_to_list (namestring, p - namestring, - VAR_NAMESPACE, LOC_BLOCK, + VAR_DOMAIN, LOC_BLOCK, &objfile->global_psymbols, 0, sh.value, psymtab_language, objfile); @@ -3417,12 +3417,12 @@ parse_partial_symbols (struct objfile *objfile) symbol table. */ if (sh.st == stProc) add_psymbol_to_list (name, strlen (name), - VAR_NAMESPACE, LOC_BLOCK, + VAR_DOMAIN, LOC_BLOCK, &objfile->global_psymbols, 0, sh.value, psymtab_language, objfile); else add_psymbol_to_list (name, strlen (name), - VAR_NAMESPACE, LOC_BLOCK, + VAR_DOMAIN, LOC_BLOCK, &objfile->static_psymbols, 0, sh.value, psymtab_language, objfile); @@ -3491,7 +3491,7 @@ parse_partial_symbols (struct objfile *objfile) && sh.index != cur_sdx + 2) { add_psymbol_to_list (name, strlen (name), - STRUCT_NAMESPACE, LOC_TYPEDEF, + STRUCT_DOMAIN, LOC_TYPEDEF, &objfile->static_psymbols, 0, (CORE_ADDR) 0, psymtab_language, objfile); @@ -3532,7 +3532,7 @@ parse_partial_symbols (struct objfile *objfile) } /* Use this gdb symbol */ add_psymbol_to_list (name, strlen (name), - VAR_NAMESPACE, class, + VAR_DOMAIN, class, &objfile->static_psymbols, 0, sh.value, psymtab_language, objfile); skip: @@ -3608,7 +3608,7 @@ parse_partial_symbols (struct objfile *objfile) } name = debug_info->ssext + psh->iss; add_psymbol_to_list (name, strlen (name), - VAR_NAMESPACE, class, + VAR_DOMAIN, class, &objfile->global_psymbols, 0, svalue, psymtab_language, objfile); @@ -3778,7 +3778,7 @@ handle_psymbol_enumerators (struct objfile *objfile, FDR *fh, int stype, /* Note that the value doesn't matter for enum constants in psymtabs, just in symtabs. */ add_psymbol_to_list (name, strlen (name), - VAR_NAMESPACE, LOC_CONST, + VAR_DOMAIN, LOC_CONST, &objfile->static_psymbols, 0, (CORE_ADDR) 0, psymtab_language, objfile); ext_sym += external_sym_size; @@ -3971,7 +3971,7 @@ psymtab_to_symtab_1 (struct partial_symtab *pst, char *filename) struct symbol *s = new_symbol (MIPS_EFI_SYMBOL_NAME); memset (e, 0, sizeof (struct mips_extra_func_info)); - SYMBOL_NAMESPACE (s) = LABEL_NAMESPACE; + SYMBOL_DOMAIN (s) = LABEL_DOMAIN; SYMBOL_CLASS (s) = LOC_CONST; SYMBOL_TYPE (s) = mdebug_type_void; SYMBOL_VALUE (s) = (long) e; @@ -4455,7 +4455,7 @@ cross_ref (int fd, union aux_ext *ax, struct type **tpp, enum type_code type_cod static struct symbol * mylookup_symbol (char *name, register struct block *block, - namespace_enum namespace, enum address_class class) + domain_enum domain, enum address_class class) { int i, inc; struct symbol *sym; @@ -4464,7 +4464,7 @@ mylookup_symbol (char *name, register struct block *block, ALL_BLOCK_SYMBOLS (block, i, sym) { if (DEPRECATED_SYMBOL_NAME (sym)[0] == inc - && SYMBOL_NAMESPACE (sym) == namespace + && SYMBOL_DOMAIN (sym) == domain && SYMBOL_CLASS (sym) == class && strcmp (DEPRECATED_SYMBOL_NAME (sym), name) == 0) return sym; @@ -4472,7 +4472,7 @@ mylookup_symbol (char *name, register struct block *block, block = BLOCK_SUPERBLOCK (block); if (block) - return mylookup_symbol (name, block, namespace, class); + return mylookup_symbol (name, block, domain, class); return 0; } @@ -4866,16 +4866,16 @@ fixup_sigtramp (void) /* We have to handle the following cases here: a) The Mips library has a sigtramp label within sigvec. b) Irix has a _sigtramp which we want to use, but it also has sigvec. */ - s = lookup_symbol ("sigvec", 0, VAR_NAMESPACE, 0, NULL); + s = lookup_symbol ("sigvec", 0, VAR_DOMAIN, 0, NULL); if (s != 0) { b0 = SYMBOL_BLOCK_VALUE (s); - s = lookup_symbol ("sigtramp", b0, VAR_NAMESPACE, 0, NULL); + s = lookup_symbol ("sigtramp", b0, VAR_DOMAIN, 0, NULL); } if (s == 0) { /* No sigvec or no sigtramp inside sigvec, try _sigtramp. */ - s = lookup_symbol ("_sigtramp", 0, VAR_NAMESPACE, 0, NULL); + s = lookup_symbol ("_sigtramp", 0, VAR_DOMAIN, 0, NULL); } /* But maybe this program uses its own version of sigvec */ @@ -4901,7 +4901,7 @@ fixup_sigtramp (void) * needed info. Note we make it a nested procedure of sigvec, * which is the way the (assembly) code is actually written. */ - SYMBOL_NAMESPACE (s) = VAR_NAMESPACE; + SYMBOL_DOMAIN (s) = VAR_DOMAIN; SYMBOL_CLASS (s) = LOC_BLOCK; SYMBOL_TYPE (s) = init_type (TYPE_CODE_FUNC, 4, 0, (char *) NULL, st->objfile); @@ -4945,7 +4945,7 @@ fixup_sigtramp (void) current_objfile = st->objfile; /* Keep new_symbol happy */ s = new_symbol (MIPS_EFI_SYMBOL_NAME); SYMBOL_VALUE (s) = (long) e; - SYMBOL_NAMESPACE (s) = LABEL_NAMESPACE; + SYMBOL_DOMAIN (s) = LABEL_DOMAIN; SYMBOL_CLASS (s) = LOC_CONST; SYMBOL_TYPE (s) = mdebug_type_void; current_objfile = NULL; diff --git a/gdb/mi/ChangeLog b/gdb/mi/ChangeLog index 055b0dd..943fd78 100644 --- a/gdb/mi/ChangeLog +++ b/gdb/mi/ChangeLog @@ -1,3 +1,8 @@ +2003-05-12 Elena Zannoni <ezannoni@redhat.com> + + * mi-mi-cmd-stack.c (list_args_or_locals): Rename VAR_NAMESPACE to + VAR_DOMAIN. + 2003-05-11 Andrew Cagney <cagney@redhat.com> * mi-symbol-cmds.c: Rename "mi-cmd-symbol.c", avoid 8.3 problem. diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c index 0a76291..1f6a9a1 100644 --- a/gdb/mi/mi-cmd-stack.c +++ b/gdb/mi/mi-cmd-stack.c @@ -280,7 +280,7 @@ list_args_or_locals (int locals, int values, struct frame_info *fi) struct symbol *sym2; if (!locals) sym2 = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym), - block, VAR_NAMESPACE, + block, VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL); else diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 57ee0df..96c4164 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -2389,7 +2389,7 @@ non_heuristic_proc_desc (CORE_ADDR pc, CORE_ADDR *addrptr) return NULL; } - sym = lookup_symbol (MIPS_EFI_SYMBOL_NAME, b, LABEL_NAMESPACE, 0, NULL); + sym = lookup_symbol (MIPS_EFI_SYMBOL_NAME, b, LABEL_DOMAIN, 0, NULL); /* If we never found a PDR for this function in symbol reading, then examine prologues to find the information. */ diff --git a/gdb/nlmread.c b/gdb/nlmread.c index 10af4c5..4e9c87d 100644 --- a/gdb/nlmread.c +++ b/gdb/nlmread.c @@ -200,7 +200,7 @@ nlm_symfile_read (struct objfile *objfile, int mainline) stabsect_build_psymtabs (objfile, mainline, ".stab", ".stabstr", ".text"); - mainsym = lookup_symbol (main_name (), NULL, VAR_NAMESPACE, NULL, NULL); + mainsym = lookup_symbol (main_name (), NULL, VAR_DOMAIN, NULL, NULL); if (mainsym && SYMBOL_CLASS (mainsym) == LOC_BLOCK) diff --git a/gdb/objc-exp.y b/gdb/objc-exp.y index 002600d..40dc5b8 100644 --- a/gdb/objc-exp.y +++ b/gdb/objc-exp.y @@ -634,7 +634,7 @@ block : BLOCKNAME block : block COLONCOLON name { struct symbol *tem = lookup_symbol (copy_name ($3), $1, - VAR_NAMESPACE, (int *) NULL, + VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL); if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK) error ("No function \"%s\" in specified context.", @@ -645,7 +645,7 @@ block : block COLONCOLON name variable: block COLONCOLON name { struct symbol *sym; sym = lookup_symbol (copy_name ($3), $1, - VAR_NAMESPACE, (int *) NULL, + VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL); if (sym == 0) error ("No symbol \"%s\" in specified context.", @@ -705,7 +705,7 @@ variable: qualified_name sym = lookup_symbol (name, (const struct block *) NULL, - VAR_NAMESPACE, (int *) NULL, + VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL); if (sym) { @@ -1659,7 +1659,7 @@ yylex () need_this = (int *) NULL; sym = lookup_symbol (tmp, expression_context_block, - VAR_NAMESPACE, + VAR_DOMAIN, need_this, (struct symtab **) NULL); /* Call lookup_symtab, not lookup_partial_symtab, in case there @@ -1738,7 +1738,7 @@ yylex () tmp1[p - namestart] = '\0'; cur_sym = lookup_symbol (ncopy, expression_context_block, - VAR_NAMESPACE, (int *) NULL, + VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL); if (cur_sym) { diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c index 368e336..21504e1 100644 --- a/gdb/objc-lang.c +++ b/gdb/objc-lang.c @@ -116,7 +116,7 @@ lookup_struct_typedef (char *name, struct block *block, int noerr) { register struct symbol *sym; - sym = lookup_symbol (name, block, STRUCT_NAMESPACE, 0, + sym = lookup_symbol (name, block, STRUCT_DOMAIN, 0, (struct symtab **) NULL); if (sym == NULL) @@ -1461,7 +1461,7 @@ char *find_imps (struct symtab *symtab, struct block *block, if (tmp == NULL) return NULL; - sym = lookup_symbol (selector, block, VAR_NAMESPACE, 0, &sym_symtab); + sym = lookup_symbol (selector, block, VAR_DOMAIN, 0, &sym_symtab); if (sym != NULL) { if (syms) diff --git a/gdb/objfiles.c b/gdb/objfiles.c index 59e03b9..e695ebe 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -667,7 +667,7 @@ objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets) fixup_symbol_section (sym, objfile); /* The RS6000 code from which this was taken skipped - any symbols in STRUCT_NAMESPACE or UNDEF_NAMESPACE. + any symbols in STRUCT_DOMAIN or UNDEF_DOMAIN. But I'm leaving out that test, on the theory that they can't possibly pass the tests below. */ if ((SYMBOL_CLASS (sym) == LOC_LABEL @@ -682,7 +682,7 @@ objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets) /* Relocate Extra Function Info for ecoff. */ else if (SYMBOL_CLASS (sym) == LOC_CONST - && SYMBOL_NAMESPACE (sym) == LABEL_NAMESPACE + && SYMBOL_DOMAIN (sym) == LABEL_DOMAIN && strcmp (DEPRECATED_SYMBOL_NAME (sym), MIPS_EFI_SYMBOL_NAME) == 0) ecoff_relocate_efi (sym, ANOFFSET (delta, s->block_line_section)); diff --git a/gdb/p-exp.y b/gdb/p-exp.y index 896a06b..282d25a 100644 --- a/gdb/p-exp.y +++ b/gdb/p-exp.y @@ -559,7 +559,7 @@ block : BLOCKNAME block : block COLONCOLON name { struct symbol *tem = lookup_symbol (copy_name ($3), $1, - VAR_NAMESPACE, (int *) NULL, + VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL); if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK) error ("No function \"%s\" in specified context.", @@ -570,7 +570,7 @@ block : block COLONCOLON name variable: block COLONCOLON name { struct symbol *sym; sym = lookup_symbol (copy_name ($3), $1, - VAR_NAMESPACE, (int *) NULL, + VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL); if (sym == 0) error ("No symbol \"%s\" in specified context.", @@ -607,7 +607,7 @@ variable: qualified_name sym = lookup_symbol (name, (const struct block *) NULL, - VAR_NAMESPACE, (int *) NULL, + VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL); if (sym) { @@ -1396,7 +1396,7 @@ yylex () static const char this_name[] = "this"; if (lookup_symbol (this_name, expression_context_block, - VAR_NAMESPACE, (int *) NULL, + VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL)) return THIS; } @@ -1437,7 +1437,7 @@ yylex () sym = NULL; else sym = lookup_symbol (tmp, expression_context_block, - VAR_NAMESPACE, + VAR_DOMAIN, &is_a_field_of_this, (struct symtab **) NULL); /* second chance uppercased (as Free Pascal does). */ @@ -1454,7 +1454,7 @@ yylex () sym = NULL; else sym = lookup_symbol (tmp, expression_context_block, - VAR_NAMESPACE, + VAR_DOMAIN, &is_a_field_of_this, (struct symtab **) NULL); if (sym || is_a_field_of_this || is_a_field) @@ -1484,7 +1484,7 @@ yylex () sym = NULL; else sym = lookup_symbol (tmp, expression_context_block, - VAR_NAMESPACE, + VAR_DOMAIN, &is_a_field_of_this, (struct symtab **) NULL); if (sym || is_a_field_of_this || is_a_field) @@ -1581,7 +1581,7 @@ yylex () memcpy (tmp1, namestart, p - namestart); tmp1[p - namestart] = '\0'; cur_sym = lookup_symbol (ncopy, expression_context_block, - VAR_NAMESPACE, (int *) NULL, + VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL); if (cur_sym) { diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c index 1f41422..5672d74 100644 --- a/gdb/p-valprint.c +++ b/gdb/p-valprint.c @@ -227,7 +227,7 @@ pascal_val_print (struct type *type, char *valaddr, int embedded_offset, if (msymbol != NULL) wsym = lookup_symbol (DEPRECATED_SYMBOL_NAME (msymbol), block, - VAR_NAMESPACE, &is_this_fld, &s); + VAR_DOMAIN, &is_this_fld, &s); if (wsym) { diff --git a/gdb/parse.c b/gdb/parse.c index d4a6a05..5db165a 100644 --- a/gdb/parse.c +++ b/gdb/parse.c @@ -472,7 +472,7 @@ write_dollar_variable (struct stoken str) symbol table lookup performance is awful, to put it mildly. */ sym = lookup_symbol (copy_name (str), (struct block *) NULL, - VAR_NAMESPACE, (int *) NULL, (struct symtab **) NULL); + VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL); if (sym) { write_exp_elt_opcode (OP_VAR_VALUE); @@ -647,17 +647,17 @@ parse_nested_classes_for_hpacc (char *name, int len, char **token, if (!done) { /* More tokens to process, so this must be a class/namespace */ - sym_class = lookup_symbol (prefix, 0, STRUCT_NAMESPACE, + sym_class = lookup_symbol (prefix, 0, STRUCT_DOMAIN, 0, (struct symtab **) NULL); } else { /* No more tokens, so try as a variable first */ - sym_var = lookup_symbol (prefix, 0, VAR_NAMESPACE, + sym_var = lookup_symbol (prefix, 0, VAR_DOMAIN, 0, (struct symtab **) NULL); /* If failed, try as class/namespace */ if (!sym_var) - sym_class = lookup_symbol (prefix, 0, STRUCT_NAMESPACE, + sym_class = lookup_symbol (prefix, 0, STRUCT_DOMAIN, 0, (struct symtab **) NULL); } diff --git a/gdb/printcmd.c b/gdb/printcmd.c index 018d773..11fd1df 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -1076,7 +1076,7 @@ address_info (char *exp, int from_tty) if (exp == 0) error ("Argument required."); - sym = lookup_symbol (exp, get_selected_block (0), VAR_NAMESPACE, + sym = lookup_symbol (exp, get_selected_block (0), VAR_DOMAIN, &is_a_field_of_this, (struct symtab **) NULL); if (sym == NULL) { @@ -1844,7 +1844,7 @@ print_frame_args (struct symbol *func, struct frame_info *fi, int num, struct symbol *nsym; nsym = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym), - b, VAR_NAMESPACE, (int *) NULL, (struct symtab **) NULL); + b, VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL); if (SYMBOL_CLASS (nsym) == LOC_REGISTER) { /* There is a LOC_ARG/LOC_REGISTER pair. This means that diff --git a/gdb/scm-lang.c b/gdb/scm-lang.c index 1af501d..0d06915 100644 --- a/gdb/scm-lang.c +++ b/gdb/scm-lang.c @@ -167,7 +167,7 @@ scm_lookup_name (char *str) if (in_eval_c () && (sym = lookup_symbol ("env", expression_context_block, - VAR_NAMESPACE, (int *) NULL, + VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL)) != NULL) args[2] = value_of_variable (sym, expression_context_block); else @@ -181,7 +181,7 @@ scm_lookup_name (char *str) sym = lookup_symbol (str, expression_context_block, - VAR_NAMESPACE, (int *) NULL, + VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL); if (sym) return value_of_variable (sym, NULL); diff --git a/gdb/source.c b/gdb/source.c index c2269fa..ae94add 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -239,7 +239,7 @@ select_source_symtab (register struct symtab *s) /* Make the default place to list be the function `main' if one exists. */ - if (lookup_symbol (main_name (), 0, VAR_NAMESPACE, 0, NULL)) + if (lookup_symbol (main_name (), 0, VAR_DOMAIN, 0, NULL)) { sals = decode_line_spec (main_name (), 1); sal = sals.sals[0]; diff --git a/gdb/stabsread.c b/gdb/stabsread.c index cf7a21b..e0c88aa 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -418,7 +418,7 @@ patch_block_stabs (struct pending *symbols, struct pending_stabs *stabs, sizeof (struct symbol)); memset (sym, 0, sizeof (struct symbol)); - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; SYMBOL_CLASS (sym) = LOC_OPTIMIZED_OUT; DEPRECATED_SYMBOL_NAME (sym) = obsavestring (name, pp - name, &objfile->symbol_obstack); @@ -677,7 +677,7 @@ read_type_number (register char **pp, register int *typenums) // OBSOLETE return 1; // OBSOLETE } // OBSOLETE /* FIXME! attach base info to type */ -// OBSOLETE bsym = lookup_symbol (bname, 0, STRUCT_NAMESPACE, 0, 0); /*demangled_name */ +// OBSOLETE bsym = lookup_symbol (bname, 0, STRUCT_DOMAIN, 0, 0); /*demangled_name */ // OBSOLETE if (bsym) // OBSOLETE { // OBSOLETE new->field.type = SYMBOL_TYPE (bsym); @@ -750,7 +750,7 @@ read_type_number (register char **pp, register int *typenums) // OBSOLETE sublist_count++; // OBSOLETE fname++; // OBSOLETE } -// OBSOLETE ref_func = lookup_symbol (fname, 0, VAR_NAMESPACE, 0, 0); /* demangled name */ +// OBSOLETE ref_func = lookup_symbol (fname, 0, VAR_DOMAIN, 0, 0); /* demangled name */ // OBSOLETE if (!ref_func) // OBSOLETE { // OBSOLETE complaint (&symfile_complaints, @@ -946,7 +946,7 @@ read_type_number (register char **pp, register int *typenums) // OBSOLETE /* Find symbol's internal gdb reference using demangled_name. // OBSOLETE This is the real sym that we want; // OBSOLETE sym was a temp hack to make debugger happy */ -// OBSOLETE ref_sym = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym), 0, STRUCT_NAMESPACE, 0, 0); +// OBSOLETE ref_sym = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym), 0, STRUCT_DOMAIN, 0, 0); // OBSOLETE type = SYMBOL_TYPE (ref_sym); @@ -1379,7 +1379,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, { SYMBOL_CLASS (sym) = LOC_CONST; SYMBOL_TYPE (sym) = error_type (&p, objfile); - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; add_symbol_to_list (sym, &file_symbols); return sym; } @@ -1472,7 +1472,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, SYMBOL_TYPE (sym) = error_type (&p, objfile); } } - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; add_symbol_to_list (sym, &file_symbols); return sym; @@ -1480,7 +1480,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, /* The name of a caught exception. */ SYMBOL_TYPE (sym) = read_type (&p, objfile); SYMBOL_CLASS (sym) = LOC_LABEL; - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; SYMBOL_VALUE_ADDRESS (sym) = valu; add_symbol_to_list (sym, &local_symbols); break; @@ -1489,7 +1489,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, /* A static function definition. */ SYMBOL_TYPE (sym) = read_type (&p, objfile); SYMBOL_CLASS (sym) = LOC_BLOCK; - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; add_symbol_to_list (sym, &file_symbols); /* fall into process_function_types. */ @@ -1560,7 +1560,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, /* A global function definition. */ SYMBOL_TYPE (sym) = read_type (&p, objfile); SYMBOL_CLASS (sym) = LOC_BLOCK; - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; add_symbol_to_list (sym, &global_symbols); goto process_function_types; @@ -1571,7 +1571,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, These definitions appear at the end of the namelist. */ SYMBOL_TYPE (sym) = read_type (&p, objfile); SYMBOL_CLASS (sym) = LOC_STATIC; - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; /* Don't add symbol references to global_sym_chain. Symbol references don't have valid names and wont't match up with minimal symbols when the global_sym_chain is relocated. @@ -1593,7 +1593,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, SYMBOL_TYPE (sym) = read_type (&p, objfile); SYMBOL_CLASS (sym) = LOC_LOCAL; SYMBOL_VALUE (sym) = valu; - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; add_symbol_to_list (sym, &local_symbols); break; @@ -1613,7 +1613,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, SYMBOL_CLASS (sym) = LOC_ARG; SYMBOL_VALUE (sym) = valu; - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; add_symbol_to_list (sym, &local_symbols); if (TARGET_BYTE_ORDER != BFD_ENDIAN_BIG) @@ -1725,7 +1725,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, SYMBOL_PRINT_NAME (sym)); SYMBOL_VALUE (sym) = SP_REGNUM; /* Known safe, though useless */ } - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; add_symbol_to_list (sym, &local_symbols); break; @@ -1741,7 +1741,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, SYMBOL_PRINT_NAME (sym)); SYMBOL_VALUE (sym) = SP_REGNUM; /* Known safe, though useless */ } - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; if (within_function) { /* Sun cc uses a pair of symbols, one 'p' and one 'r' with the same @@ -1812,7 +1812,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, } } #endif - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; add_symbol_to_list (sym, &file_symbols); break; @@ -1827,7 +1827,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, SYMBOL_CLASS (sym) = LOC_TYPEDEF; SYMBOL_VALUE (sym) = valu; - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; /* C++ vagaries: we may have a type which is derived from a base type which did not have its name defined when the derived class was output. We fill in the derived class's @@ -1928,7 +1928,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, SYMBOL_CLASS (sym) = LOC_TYPEDEF; SYMBOL_VALUE (sym) = valu; - SYMBOL_NAMESPACE (sym) = STRUCT_NAMESPACE; + SYMBOL_DOMAIN (sym) = STRUCT_DOMAIN; if (TYPE_TAG_NAME (SYMBOL_TYPE (sym)) == 0) TYPE_TAG_NAME (SYMBOL_TYPE (sym)) = obconcat (&objfile->type_obstack, "", "", DEPRECATED_SYMBOL_NAME (sym)); @@ -1942,7 +1942,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, *typedef_sym = *sym; SYMBOL_CLASS (typedef_sym) = LOC_TYPEDEF; SYMBOL_VALUE (typedef_sym) = valu; - SYMBOL_NAMESPACE (typedef_sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (typedef_sym) = VAR_DOMAIN; if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0) TYPE_NAME (SYMBOL_TYPE (sym)) = obconcat (&objfile->type_obstack, "", "", DEPRECATED_SYMBOL_NAME (sym)); @@ -1967,7 +1967,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, } } #endif - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; add_symbol_to_list (sym, &local_symbols); break; @@ -1976,7 +1976,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, SYMBOL_TYPE (sym) = read_type (&p, objfile); SYMBOL_CLASS (sym) = LOC_REF_ARG; SYMBOL_VALUE (sym) = valu; - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; add_symbol_to_list (sym, &local_symbols); break; @@ -1992,7 +1992,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, SYMBOL_PRINT_NAME (sym)); SYMBOL_VALUE (sym) = SP_REGNUM; /* Known safe, though useless */ } - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; add_symbol_to_list (sym, &local_symbols); break; @@ -2004,7 +2004,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, SYMBOL_TYPE (sym) = read_type (&p, objfile); SYMBOL_CLASS (sym) = LOC_LOCAL; SYMBOL_VALUE (sym) = valu; - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; add_symbol_to_list (sym, &local_symbols); break; #if 0 /* OBSOLETE CFront */ @@ -2027,7 +2027,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, // OBSOLETE SYMBOL_TYPE (sym) = error_type (&p, objfile); /* FIXME! change later */ // OBSOLETE SYMBOL_CLASS (sym) = LOC_CONST; // OBSOLETE SYMBOL_VALUE (sym) = 0; -// OBSOLETE SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; +// OBSOLETE SYMBOL_DOMAIN (sym) = VAR_DOMAIN; // OBSOLETE /* Don't add to list - we'll delete it later when // OBSOLETE we add the continuation to the real sym */ // OBSOLETE return sym; @@ -2038,7 +2038,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, SYMBOL_TYPE (sym) = error_type (&p, objfile); SYMBOL_CLASS (sym) = LOC_CONST; SYMBOL_VALUE (sym) = 0; - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; add_symbol_to_list (sym, &file_symbols); break; } @@ -2393,7 +2393,7 @@ again: struct symbol *sym = ppt->symbol[i]; if (SYMBOL_CLASS (sym) == LOC_TYPEDEF - && SYMBOL_NAMESPACE (sym) == STRUCT_NAMESPACE + && SYMBOL_DOMAIN (sym) == STRUCT_DOMAIN && (TYPE_CODE (SYMBOL_TYPE (sym)) == code) && STREQ (DEPRECATED_SYMBOL_NAME (sym), type_name)) { @@ -4068,7 +4068,7 @@ attach_fn_fields_to_type (struct field_info *fip, register struct type *type) // OBSOLETE STABS_CONTINUE (pp, objfile); /* handle \\ */ // OBSOLETE while (**pp != ';' && (sname = get_substring (pp, ' '), sname)) // OBSOLETE { -// OBSOLETE ref_static = lookup_symbol (sname, 0, VAR_NAMESPACE, 0, 0); /*demangled_name */ +// OBSOLETE ref_static = lookup_symbol (sname, 0, VAR_DOMAIN, 0, 0); /*demangled_name */ // OBSOLETE if (!ref_static) // OBSOLETE { // OBSOLETE complaint (&symfile_complaints, @@ -4500,7 +4500,7 @@ read_enum_type (register char **pp, register struct type *type, DEPRECATED_SYMBOL_NAME (sym) = name; SYMBOL_LANGUAGE (sym) = current_subfile->language; SYMBOL_CLASS (sym) = LOC_CONST; - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; SYMBOL_VALUE (sym) = n; if (n < 0) unsigned_enum = 0; @@ -5187,7 +5187,7 @@ cleanup_undefined_types (void) struct symbol *sym = ppt->symbol[i]; if (SYMBOL_CLASS (sym) == LOC_TYPEDEF - && SYMBOL_NAMESPACE (sym) == STRUCT_NAMESPACE + && SYMBOL_DOMAIN (sym) == STRUCT_DOMAIN && (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE (*type)) && STREQ (DEPRECATED_SYMBOL_NAME (sym), typename)) diff --git a/gdb/stack.c b/gdb/stack.c index 0a0aaac..e865270 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -1332,7 +1332,7 @@ print_frame_arg_vars (register struct frame_info *fi, are not combined in symbol-reading. */ sym2 = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym), - b, VAR_NAMESPACE, (int *) NULL, (struct symtab **) NULL); + b, VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL); print_variable_value (sym2, fi, stream); fprintf_filtered (stream, "\n"); break; diff --git a/gdb/symfile.c b/gdb/symfile.c index 7d7886a..8bb3b37 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -2640,7 +2640,7 @@ start_psymtab_common (struct objfile *objfile, Since one arg is a struct, we pass in a ptr and deref it (sigh). */ void -add_psymbol_to_list (char *name, int namelength, namespace_enum namespace, +add_psymbol_to_list (char *name, int namelength, domain_enum domain, enum address_class class, struct psymbol_allocation_list *list, long val, /* Value as a long */ CORE_ADDR coreaddr, /* Value as a CORE_ADDR */ @@ -2667,7 +2667,7 @@ add_psymbol_to_list (char *name, int namelength, namespace_enum namespace, } SYMBOL_SECTION (&psymbol) = 0; SYMBOL_LANGUAGE (&psymbol) = language; - PSYMBOL_NAMESPACE (&psymbol) = namespace; + PSYMBOL_DOMAIN (&psymbol) = domain; PSYMBOL_CLASS (&psymbol) = class; SYMBOL_SET_NAMES (&psymbol, buf, namelength, objfile); @@ -2690,7 +2690,7 @@ add_psymbol_to_list (char *name, int namelength, namespace_enum namespace, void add_psymbol_with_dem_name_to_list (char *name, int namelength, char *dem_name, - int dem_namelength, namespace_enum namespace, + int dem_namelength, domain_enum domain, enum address_class class, struct psymbol_allocation_list *list, long val, /* Value as a long */ CORE_ADDR coreaddr, /* Value as a CORE_ADDR */ @@ -2735,7 +2735,7 @@ add_psymbol_with_dem_name_to_list (char *name, int namelength, char *dem_name, } SYMBOL_SECTION (&psymbol) = 0; SYMBOL_LANGUAGE (&psymbol) = language; - PSYMBOL_NAMESPACE (&psymbol) = namespace; + PSYMBOL_DOMAIN (&psymbol) = domain; PSYMBOL_CLASS (&psymbol) = class; SYMBOL_INIT_LANGUAGE_SPECIFIC (&psymbol, language); diff --git a/gdb/symfile.h b/gdb/symfile.h index 0e2f1ef..04b0d89 100644 --- a/gdb/symfile.h +++ b/gdb/symfile.h @@ -149,12 +149,12 @@ extern void extend_psymbol_list (struct psymbol_allocation_list *, /* #include "demangle.h" */ extern void -add_psymbol_to_list (char *, int, namespace_enum, enum address_class, +add_psymbol_to_list (char *, int, domain_enum, enum address_class, struct psymbol_allocation_list *, long, CORE_ADDR, enum language, struct objfile *); extern void -add_psymbol_with_dem_name_to_list (char *, int, char *, int, namespace_enum, +add_psymbol_with_dem_name_to_list (char *, int, char *, int, domain_enum, enum address_class, struct psymbol_allocation_list *, long, CORE_ADDR, diff --git a/gdb/symmisc.c b/gdb/symmisc.c index 636b1d9..3b57e5f 100644 --- a/gdb/symmisc.c +++ b/gdb/symmisc.c @@ -599,7 +599,7 @@ print_symbol (void *args) struct ui_file *outfile = ((struct print_symbol_args *) args)->outfile; print_spaces (depth, outfile); - if (SYMBOL_NAMESPACE (symbol) == LABEL_NAMESPACE) + if (SYMBOL_DOMAIN (symbol) == LABEL_DOMAIN) { fprintf_filtered (outfile, "label %s at ", SYMBOL_PRINT_NAME (symbol)); print_address_numeric (SYMBOL_VALUE_ADDRESS (symbol), 1, outfile); @@ -611,7 +611,7 @@ print_symbol (void *args) fprintf_filtered (outfile, "\n"); return 1; } - if (SYMBOL_NAMESPACE (symbol) == STRUCT_NAMESPACE) + if (SYMBOL_DOMAIN (symbol) == STRUCT_DOMAIN) { if (TYPE_TAG_NAME (SYMBOL_TYPE (symbol))) { @@ -838,22 +838,22 @@ print_partial_symbols (struct partial_symbol **p, int count, char *what, fprintf_filtered (outfile, " `%s'", SYMBOL_DEMANGLED_NAME (*p)); } fputs_filtered (", ", outfile); - switch (SYMBOL_NAMESPACE (*p)) + switch (SYMBOL_DOMAIN (*p)) { - case UNDEF_NAMESPACE: - fputs_filtered ("undefined namespace, ", outfile); + case UNDEF_DOMAIN: + fputs_filtered ("undefined domain, ", outfile); break; - case VAR_NAMESPACE: + case VAR_DOMAIN: /* This is the usual thing -- don't print it */ break; - case STRUCT_NAMESPACE: - fputs_filtered ("struct namespace, ", outfile); + case STRUCT_DOMAIN: + fputs_filtered ("struct domain, ", outfile); break; - case LABEL_NAMESPACE: - fputs_filtered ("label namespace, ", outfile); + case LABEL_DOMAIN: + fputs_filtered ("label domain, ", outfile); break; default: - fputs_filtered ("<invalid namespace>, ", outfile); + fputs_filtered ("<invalid domain>, ", outfile); break; } switch (SYMBOL_CLASS (*p)) @@ -1151,7 +1151,7 @@ maintenance_check_symtabs (char *ignore, int from_tty) while (length--) { sym = lookup_block_symbol (b, DEPRECATED_SYMBOL_NAME (*psym), - NULL, SYMBOL_NAMESPACE (*psym)); + NULL, SYMBOL_DOMAIN (*psym)); if (!sym) { printf_filtered ("Static symbol `"); @@ -1168,7 +1168,7 @@ maintenance_check_symtabs (char *ignore, int from_tty) while (length--) { sym = lookup_block_symbol (b, DEPRECATED_SYMBOL_NAME (*psym), - NULL, SYMBOL_NAMESPACE (*psym)); + NULL, SYMBOL_DOMAIN (*psym)); if (!sym) { printf_filtered ("Global symbol `"); diff --git a/gdb/symtab.c b/gdb/symtab.c index 2c46f9d..dbc83b9 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -79,12 +79,12 @@ char *operator_chars (char *p, char **end); static struct partial_symbol *lookup_partial_symbol (struct partial_symtab *, const char *, const char *, int, - namespace_enum); + domain_enum); static struct symbol *lookup_symbol_aux (const char *name, const char *mangled_name, const struct block *block, - const namespace_enum namespace, + const domain_enum domain, int *is_a_field_of_this, struct symtab **symtab); @@ -92,7 +92,7 @@ static struct symbol *lookup_symbol_aux_local (const char *name, const char *mangled_name, const struct block *block, - const namespace_enum namespace, + const domain_enum domain, struct symtab **symtab, const struct block **static_block); @@ -100,27 +100,27 @@ static struct symbol *lookup_symbol_aux_block (const char *name, const char *mangled_name, const struct block *block, - const namespace_enum namespace, + const domain_enum domain, struct symtab **symtab); static struct symbol *lookup_symbol_aux_symtabs (int block_index, const char *name, const char *mangled_name, - const namespace_enum namespace, + const domain_enum domain, struct symtab **symtab); static struct symbol *lookup_symbol_aux_psymtabs (int block_index, const char *name, const char *mangled_name, - const namespace_enum namespace, + const domain_enum domain, struct symtab **symtab); static struct symbol *lookup_symbol_aux_minsyms (const char *name, const char *mangled_name, - const namespace_enum namespace, + const domain_enum domain, int *is_a_field_of_this, struct symtab **symtab); @@ -134,12 +134,12 @@ static void fixup_section (struct general_symbol_info *, struct objfile *); static int file_matches (char *, char **, int); -static void print_symbol_info (namespace_enum, +static void print_symbol_info (domain_enum, struct symtab *, struct symbol *, int, char *); static void print_msymbol_info (struct minimal_symbol *); -static void symtab_symbol_info (char *, namespace_enum, int); +static void symtab_symbol_info (char *, domain_enum, int); static void overload_list_add_symbol (struct symbol *sym, char *oload_name); @@ -779,7 +779,7 @@ find_pc_sect_psymbol (struct partial_symtab *psymtab, CORE_ADDR pc, pp++) { p = *pp; - if (SYMBOL_NAMESPACE (p) == VAR_NAMESPACE + if (SYMBOL_DOMAIN (p) == VAR_DOMAIN && SYMBOL_CLASS (p) == LOC_BLOCK && pc >= SYMBOL_VALUE_ADDRESS (p) && (SYMBOL_VALUE_ADDRESS (p) > best_pc @@ -803,7 +803,7 @@ find_pc_sect_psymbol (struct partial_symtab *psymtab, CORE_ADDR pc, pp++) { p = *pp; - if (SYMBOL_NAMESPACE (p) == VAR_NAMESPACE + if (SYMBOL_DOMAIN (p) == VAR_DOMAIN && SYMBOL_CLASS (p) == LOC_BLOCK && pc >= SYMBOL_VALUE_ADDRESS (p) && (SYMBOL_VALUE_ADDRESS (p) > best_pc @@ -878,7 +878,7 @@ fixup_psymbol_section (struct partial_symbol *psym, struct objfile *objfile) } /* Find the definition for a specified symbol name NAME - in namespace NAMESPACE, visible from lexical block BLOCK. + in domain DOMAIN, visible from lexical block BLOCK. Returns the struct symbol pointer, or zero if no symbol is found. If SYMTAB is non-NULL, store the symbol table in which the symbol was found there, or NULL if not found. @@ -900,7 +900,7 @@ fixup_psymbol_section (struct partial_symbol *psym, struct objfile *objfile) struct symbol * lookup_symbol (const char *name, const struct block *block, - const namespace_enum namespace, int *is_a_field_of_this, + const domain_enum domain, int *is_a_field_of_this, struct symtab **symtab) { char *demangled_name = NULL; @@ -938,7 +938,7 @@ lookup_symbol (const char *name, const struct block *block, } returnval = lookup_symbol_aux (modified_name, mangled_name, block, - namespace, is_a_field_of_this, symtab); + domain, is_a_field_of_this, symtab); if (needtofreename) xfree (demangled_name); @@ -947,7 +947,7 @@ lookup_symbol (const char *name, const struct block *block, static struct symbol * lookup_symbol_aux (const char *name, const char *mangled_name, - const struct block *block, const namespace_enum namespace, + const struct block *block, const domain_enum domain, int *is_a_field_of_this, struct symtab **symtab) { struct symbol *sym; @@ -956,7 +956,7 @@ lookup_symbol_aux (const char *name, const char *mangled_name, /* Search specified block and its superiors. Don't search STATIC_BLOCK or GLOBAL_BLOCK. */ - sym = lookup_symbol_aux_local (name, mangled_name, block, namespace, + sym = lookup_symbol_aux_local (name, mangled_name, block, domain, symtab, &static_block); if (sym != NULL) return sym; @@ -969,7 +969,7 @@ lookup_symbol_aux (const char *name, const char *mangled_name, /* FIXME: this code is never executed--block is always NULL at this point. What is it trying to do, anyway? We already should have checked the STATIC_BLOCK above (it is the superblock of top-level - blocks). Why is VAR_NAMESPACE special-cased? */ + blocks). Why is VAR_DOMAIN special-cased? */ /* Don't need to mess with the psymtabs; if we have a block, that file is read in. If we don't, then we deal later with all the psymtab stuff that needs checking. */ @@ -983,7 +983,7 @@ lookup_symbol_aux (const char *name, const char *mangled_name, * code to find any 'sym''s that were not found above. I vote for * deleting the following paragraph of code. */ - if (namespace == VAR_NAMESPACE && block != NULL) + if (domain == VAR_DOMAIN && block != NULL) { struct block *b; /* Find the right symtab. */ @@ -994,7 +994,7 @@ lookup_symbol_aux (const char *name, const char *mangled_name, if (BLOCK_START (b) <= BLOCK_START (block) && BLOCK_END (b) > BLOCK_START (block)) { - sym = lookup_block_symbol (b, name, mangled_name, VAR_NAMESPACE); + sym = lookup_block_symbol (b, name, mangled_name, VAR_DOMAIN); if (sym) { block_found = b; @@ -1050,7 +1050,7 @@ lookup_symbol_aux (const char *name, const char *mangled_name, if (static_block != NULL) { sym = lookup_symbol_aux_block (name, mangled_name, static_block, - namespace, symtab); + domain, symtab); if (sym != NULL) return sym; } @@ -1061,7 +1061,7 @@ lookup_symbol_aux (const char *name, const char *mangled_name, conversion on the fly and return the found symbol. */ sym = lookup_symbol_aux_symtabs (GLOBAL_BLOCK, name, mangled_name, - namespace, symtab); + domain, symtab); if (sym != NULL) return sym; @@ -1072,7 +1072,7 @@ lookup_symbol_aux (const char *name, const char *mangled_name, Eventually, all global symbols might be resolved in this way. */ sym = lookup_symbol_aux_minsyms (name, mangled_name, - namespace, is_a_field_of_this, + domain, is_a_field_of_this, symtab); if (sym != NULL) @@ -1081,7 +1081,7 @@ lookup_symbol_aux (const char *name, const char *mangled_name, #endif sym = lookup_symbol_aux_psymtabs (GLOBAL_BLOCK, name, mangled_name, - namespace, symtab); + domain, symtab); if (sym != NULL) return sym; @@ -1092,12 +1092,12 @@ lookup_symbol_aux (const char *name, const char *mangled_name, conversion on the fly and return the found symbol. */ sym = lookup_symbol_aux_symtabs (STATIC_BLOCK, name, mangled_name, - namespace, symtab); + domain, symtab); if (sym != NULL) return sym; sym = lookup_symbol_aux_psymtabs (STATIC_BLOCK, name, mangled_name, - namespace, symtab); + domain, symtab); if (sym != NULL) return sym; @@ -1120,7 +1120,7 @@ lookup_symbol_aux (const char *name, const char *mangled_name, sym = lookup_symbol_aux_minsyms (name, mangled_name, - namespace, is_a_field_of_this, + domain, is_a_field_of_this, symtab); if (sym != NULL) @@ -1140,7 +1140,7 @@ lookup_symbol_aux (const char *name, const char *mangled_name, static struct symbol * lookup_symbol_aux_local (const char *name, const char *mangled_name, const struct block *block, - const namespace_enum namespace, + const domain_enum domain, struct symtab **symtab, const struct block **static_block) { @@ -1156,7 +1156,7 @@ lookup_symbol_aux_local (const char *name, const char *mangled_name, while (BLOCK_SUPERBLOCK (BLOCK_SUPERBLOCK (block)) != NULL) { - sym = lookup_symbol_aux_block (name, mangled_name, block, namespace, + sym = lookup_symbol_aux_block (name, mangled_name, block, domain, symtab); if (sym != NULL) return sym; @@ -1175,7 +1175,7 @@ lookup_symbol_aux_local (const char *name, const char *mangled_name, static struct symbol * lookup_symbol_aux_block (const char *name, const char *mangled_name, const struct block *block, - const namespace_enum namespace, + const domain_enum domain, struct symtab **symtab) { struct symbol *sym; @@ -1184,7 +1184,7 @@ lookup_symbol_aux_block (const char *name, const char *mangled_name, struct block *b; struct symtab *s = NULL; - sym = lookup_block_symbol (block, name, mangled_name, namespace); + sym = lookup_block_symbol (block, name, mangled_name, domain); if (sym) { block_found = block; @@ -1218,7 +1218,7 @@ lookup_symbol_aux_block (const char *name, const char *mangled_name, static struct symbol * lookup_symbol_aux_symtabs (int block_index, const char *name, const char *mangled_name, - const namespace_enum namespace, + const domain_enum domain, struct symtab **symtab) { struct symbol *sym; @@ -1231,7 +1231,7 @@ lookup_symbol_aux_symtabs (int block_index, { bv = BLOCKVECTOR (s); block = BLOCKVECTOR_BLOCK (bv, block_index); - sym = lookup_block_symbol (block, name, mangled_name, namespace); + sym = lookup_block_symbol (block, name, mangled_name, domain); if (sym) { block_found = block; @@ -1252,7 +1252,7 @@ lookup_symbol_aux_symtabs (int block_index, static struct symbol * lookup_symbol_aux_psymtabs (int block_index, const char *name, const char *mangled_name, - const namespace_enum namespace, + const domain_enum domain, struct symtab **symtab) { struct symbol *sym; @@ -1267,12 +1267,12 @@ lookup_symbol_aux_psymtabs (int block_index, const char *name, { if (!ps->readin && lookup_partial_symbol (ps, name, mangled_name, - psymtab_index, namespace)) + psymtab_index, domain)) { s = PSYMTAB_TO_SYMTAB (ps); bv = BLOCKVECTOR (s); block = BLOCKVECTOR_BLOCK (bv, block_index); - sym = lookup_block_symbol (block, name, mangled_name, namespace); + sym = lookup_block_symbol (block, name, mangled_name, domain); if (!sym) { /* This shouldn't be necessary, but as a last resort try @@ -1289,7 +1289,7 @@ lookup_symbol_aux_psymtabs (int block_index, const char *name, block = BLOCKVECTOR_BLOCK (bv, block_index == GLOBAL_BLOCK ? STATIC_BLOCK : GLOBAL_BLOCK); - sym = lookup_block_symbol (block, name, mangled_name, namespace); + sym = lookup_block_symbol (block, name, mangled_name, domain); if (!sym) error ("Internal: %s symbol `%s' found in %s psymtab but not in symtab.\n%s may be an inlined function, or may be a template function\n(if a template, try specifying an instantiation: %s<type>).", block_index == GLOBAL_BLOCK ? "global" : "static", @@ -1320,7 +1320,7 @@ lookup_symbol_aux_psymtabs (int block_index, const char *name, static struct symbol * lookup_symbol_aux_minsyms (const char *name, const char *mangled_name, - const namespace_enum namespace, + const domain_enum domain, int *is_a_field_of_this, struct symtab **symtab) { @@ -1330,7 +1330,7 @@ lookup_symbol_aux_minsyms (const char *name, struct minimal_symbol *msymbol; struct symtab *s; - if (namespace == VAR_NAMESPACE) + if (domain == VAR_DOMAIN) { msymbol = lookup_minimal_symbol (name, NULL, NULL); @@ -1364,14 +1364,14 @@ lookup_symbol_aux_minsyms (const char *name, to be clearly the wrong thing to pass as the unmangled name. */ sym = - lookup_block_symbol (block, name, mangled_name, namespace); + lookup_block_symbol (block, name, mangled_name, domain); /* We kept static functions in minimal symbol table as well as in static scope. We want to find them in the symbol table. */ if (!sym) { block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); sym = lookup_block_symbol (block, name, - mangled_name, namespace); + mangled_name, domain); } /* NOTE: carlton/2002-12-04: The following comment was @@ -1424,7 +1424,7 @@ lookup_symbol_aux_minsyms (const char *name, /* This is a mangled variable, look it up by its mangled name. */ return lookup_symbol_aux (DEPRECATED_SYMBOL_NAME (msymbol), mangled_name, - NULL, namespace, is_a_field_of_this, + NULL, domain, is_a_field_of_this, symtab); } } @@ -1441,7 +1441,7 @@ lookup_symbol_aux_minsyms (const char *name, static struct partial_symbol * lookup_partial_symbol (struct partial_symtab *pst, const char *name, const char *linkage_name, int global, - namespace_enum namespace) + domain_enum domain) { struct partial_symbol *temp; struct partial_symbol **start, **psym; @@ -1465,7 +1465,7 @@ lookup_partial_symbol (struct partial_symtab *pst, const char *name, pointing at the earliest partial symbol whose name might be correct. At that point *all* partial symbols with an appropriate name will be checked against the correct - namespace. */ + domain. */ bottom = start; top = start + length - 1; @@ -1497,7 +1497,7 @@ lookup_partial_symbol (struct partial_symtab *pst, const char *name, ? strcmp (SYMBOL_LINKAGE_NAME (*top), linkage_name) == 0 : SYMBOL_MATCHES_NATURAL_NAME (*top,name))) { - if (SYMBOL_NAMESPACE (*top) == namespace) + if (SYMBOL_DOMAIN (*top) == domain) { return (*top); } @@ -1512,7 +1512,7 @@ lookup_partial_symbol (struct partial_symtab *pst, const char *name, { for (psym = start; psym < start + length; psym++) { - if (namespace == SYMBOL_NAMESPACE (*psym)) + if (domain == SYMBOL_DOMAIN (*psym)) { if (linkage_name != NULL ? strcmp (SYMBOL_LINKAGE_NAME (*psym), linkage_name) == 0 @@ -1527,12 +1527,12 @@ lookup_partial_symbol (struct partial_symtab *pst, const char *name, return (NULL); } -/* Look up a type named NAME in the struct_namespace. The type returned +/* Look up a type named NAME in the struct_domain. The type returned must not be opaque -- i.e., must have at least one field defined This code was modelled on lookup_symbol -- the parts not relevant to looking up types were just left out. In particular it's assumed here that types - are available in struct_namespace and only at file-static or global blocks. */ + are available in struct_domain and only at file-static or global blocks. */ struct type * @@ -1554,7 +1554,7 @@ lookup_transparent_type (const char *name) { bv = BLOCKVECTOR (s); block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); - sym = lookup_block_symbol (block, name, NULL, STRUCT_NAMESPACE); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); if (sym && !TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) { return SYMBOL_TYPE (sym); @@ -1564,12 +1564,12 @@ lookup_transparent_type (const char *name) ALL_PSYMTABS (objfile, ps) { if (!ps->readin && lookup_partial_symbol (ps, name, NULL, - 1, STRUCT_NAMESPACE)) + 1, STRUCT_DOMAIN)) { s = PSYMTAB_TO_SYMTAB (ps); bv = BLOCKVECTOR (s); block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); - sym = lookup_block_symbol (block, name, NULL, STRUCT_NAMESPACE); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); if (!sym) { /* This shouldn't be necessary, but as a last resort @@ -1578,7 +1578,7 @@ lookup_transparent_type (const char *name) * the psymtab gets it wrong in some cases. */ block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); - sym = lookup_block_symbol (block, name, NULL, STRUCT_NAMESPACE); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); if (!sym) error ("Internal: global symbol `%s' found in %s psymtab but not in symtab.\n\ %s may be an inlined function, or may be a template function\n\ @@ -1602,7 +1602,7 @@ lookup_transparent_type (const char *name) { bv = BLOCKVECTOR (s); block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); - sym = lookup_block_symbol (block, name, NULL, STRUCT_NAMESPACE); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); if (sym && !TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) { return SYMBOL_TYPE (sym); @@ -1611,12 +1611,12 @@ lookup_transparent_type (const char *name) ALL_PSYMTABS (objfile, ps) { - if (!ps->readin && lookup_partial_symbol (ps, name, NULL, 0, STRUCT_NAMESPACE)) + if (!ps->readin && lookup_partial_symbol (ps, name, NULL, 0, STRUCT_DOMAIN)) { s = PSYMTAB_TO_SYMTAB (ps); bv = BLOCKVECTOR (s); block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); - sym = lookup_block_symbol (block, name, NULL, STRUCT_NAMESPACE); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); if (!sym) { /* This shouldn't be necessary, but as a last resort @@ -1625,7 +1625,7 @@ lookup_transparent_type (const char *name) * the psymtab gets it wrong in some cases. */ block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); - sym = lookup_block_symbol (block, name, NULL, STRUCT_NAMESPACE); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); if (!sym) error ("Internal: static symbol `%s' found in %s psymtab but not in symtab.\n\ %s may be an inlined function, or may be a template function\n\ @@ -1652,7 +1652,7 @@ find_main_psymtab (void) ALL_PSYMTABS (objfile, pst) { - if (lookup_partial_symbol (pst, main_name (), NULL, 1, VAR_NAMESPACE)) + if (lookup_partial_symbol (pst, main_name (), NULL, 1, VAR_DOMAIN)) { return (pst); } @@ -1660,7 +1660,7 @@ find_main_psymtab (void) return (NULL); } -/* Search BLOCK for symbol NAME in NAMESPACE. +/* Search BLOCK for symbol NAME in DOMAIN. Note that if NAME is the demangled form of a C++ symbol, we will fail to find a match during the binary search of the non-encoded names, but @@ -1678,7 +1678,7 @@ find_main_psymtab (void) struct symbol * lookup_block_symbol (register const struct block *block, const char *name, const char *mangled_name, - const namespace_enum namespace) + const domain_enum domain) { register int bot, top, inc; register struct symbol *sym; @@ -1692,7 +1692,7 @@ lookup_block_symbol (register const struct block *block, const char *name, hash_index = hash_index % BLOCK_BUCKETS (block); for (sym = BLOCK_BUCKET (block, hash_index); sym; sym = sym->hash_next) { - if (SYMBOL_NAMESPACE (sym) == namespace + if (SYMBOL_DOMAIN (sym) == domain && (mangled_name ? strcmp (DEPRECATED_SYMBOL_NAME (sym), mangled_name) == 0 : SYMBOL_MATCHES_NATURAL_NAME (sym, name))) @@ -1749,9 +1749,9 @@ lookup_block_symbol (register const struct block *block, const char *name, /* Now scan forward until we run out of symbols, find one whose name is greater than NAME, or find one we want. If there is - more than one symbol with the right name and namespace, we + more than one symbol with the right name and domain, we return the first one; I believe it is now impossible for us - to encounter two symbols with the same name and namespace + to encounter two symbols with the same name and domain here, because blocks containing argument symbols are no longer sorted. The exception is for C++, where multiple functions (cloned constructors / destructors, in particular) can have @@ -1762,7 +1762,7 @@ lookup_block_symbol (register const struct block *block, const char *name, while (bot < top) { sym = BLOCK_SYM (block, bot); - if (SYMBOL_NAMESPACE (sym) == namespace + if (SYMBOL_DOMAIN (sym) == domain && (mangled_name ? strcmp (DEPRECATED_SYMBOL_NAME (sym), mangled_name) == 0 : SYMBOL_MATCHES_NATURAL_NAME (sym, name))) @@ -1797,7 +1797,7 @@ lookup_block_symbol (register const struct block *block, const char *name, while (bot < top) { sym = BLOCK_SYM (block, bot); - if (SYMBOL_NAMESPACE (sym) == namespace + if (SYMBOL_DOMAIN (sym) == domain && (mangled_name ? strcmp (DEPRECATED_SYMBOL_NAME (sym), mangled_name) == 0 : SYMBOL_MATCHES_NATURAL_NAME (sym, name))) @@ -2868,10 +2868,10 @@ sort_search_symbols (struct symbol_search *prevtail, int nfound) returning the results in *MATCHES. Only symbols of KIND are searched: - FUNCTIONS_NAMESPACE - search all functions - TYPES_NAMESPACE - search all type names - METHODS_NAMESPACE - search all methods NOT IMPLEMENTED - VARIABLES_NAMESPACE - search all symbols, excluding functions, type names, + FUNCTIONS_DOMAIN - search all functions + TYPES_DOMAIN - search all type names + METHODS_DOMAIN - search all methods NOT IMPLEMENTED + VARIABLES_DOMAIN - search all symbols, excluding functions, type names, and constants (enums) free_search_symbols should be called when *MATCHES is no longer needed. @@ -2880,7 +2880,7 @@ sort_search_symbols (struct symbol_search *prevtail, int nfound) separately alphabetized. */ void -search_symbols (char *regexp, namespace_enum kind, int nfiles, char *files[], +search_symbols (char *regexp, domain_enum kind, int nfiles, char *files[], struct symbol_search **matches) { register struct symtab *s; @@ -2917,13 +2917,13 @@ search_symbols (char *regexp, namespace_enum kind, int nfiles, char *files[], struct symbol_search *tail; struct cleanup *old_chain = NULL; - if (kind < VARIABLES_NAMESPACE) - error ("must search on specific namespace"); + if (kind < VARIABLES_DOMAIN) + error ("must search on specific domain"); - ourtype = types[(int) (kind - VARIABLES_NAMESPACE)]; - ourtype2 = types2[(int) (kind - VARIABLES_NAMESPACE)]; - ourtype3 = types3[(int) (kind - VARIABLES_NAMESPACE)]; - ourtype4 = types4[(int) (kind - VARIABLES_NAMESPACE)]; + ourtype = types[(int) (kind - VARIABLES_DOMAIN)]; + ourtype2 = types2[(int) (kind - VARIABLES_DOMAIN)]; + ourtype3 = types3[(int) (kind - VARIABLES_DOMAIN)]; + ourtype4 = types4[(int) (kind - VARIABLES_DOMAIN)]; sr = *matches = NULL; tail = NULL; @@ -3005,11 +3005,11 @@ search_symbols (char *regexp, namespace_enum kind, int nfiles, char *files[], if (file_matches (ps->filename, files, nfiles) && ((regexp == NULL || re_exec (SYMBOL_NATURAL_NAME (*psym)) != 0) - && ((kind == VARIABLES_NAMESPACE && SYMBOL_CLASS (*psym) != LOC_TYPEDEF + && ((kind == VARIABLES_DOMAIN && SYMBOL_CLASS (*psym) != LOC_TYPEDEF && SYMBOL_CLASS (*psym) != LOC_BLOCK) - || (kind == FUNCTIONS_NAMESPACE && SYMBOL_CLASS (*psym) == LOC_BLOCK) - || (kind == TYPES_NAMESPACE && SYMBOL_CLASS (*psym) == LOC_TYPEDEF) - || (kind == METHODS_NAMESPACE && SYMBOL_CLASS (*psym) == LOC_BLOCK)))) + || (kind == FUNCTIONS_DOMAIN && SYMBOL_CLASS (*psym) == LOC_BLOCK) + || (kind == TYPES_DOMAIN && SYMBOL_CLASS (*psym) == LOC_TYPEDEF) + || (kind == METHODS_DOMAIN && SYMBOL_CLASS (*psym) == LOC_BLOCK)))) { PSYMTAB_TO_SYMTAB (ps); keep_going = 0; @@ -3032,7 +3032,7 @@ search_symbols (char *regexp, namespace_enum kind, int nfiles, char *files[], any matching symbols without debug info. */ - if (nfiles == 0 && (kind == VARIABLES_NAMESPACE || kind == FUNCTIONS_NAMESPACE)) + if (nfiles == 0 && (kind == VARIABLES_DOMAIN || kind == FUNCTIONS_DOMAIN)) { ALL_MSYMBOLS (objfile, msymbol) { @@ -3052,10 +3052,10 @@ search_symbols (char *regexp, namespace_enum kind, int nfiles, char *files[], function lookup_symbol_minsym that found the symbol associated to a given minimal symbol (if any). */ - if (kind == FUNCTIONS_NAMESPACE + if (kind == FUNCTIONS_DOMAIN || lookup_symbol (DEPRECATED_SYMBOL_NAME (msymbol), (struct block *) NULL, - VAR_NAMESPACE, + VAR_DOMAIN, 0, (struct symtab **) NULL) == NULL) found_misc = 1; } @@ -3084,12 +3084,12 @@ search_symbols (char *regexp, namespace_enum kind, int nfiles, char *files[], if (file_matches (s->filename, files, nfiles) && ((regexp == NULL || re_exec (SYMBOL_NATURAL_NAME (sym)) != 0) - && ((kind == VARIABLES_NAMESPACE && SYMBOL_CLASS (sym) != LOC_TYPEDEF + && ((kind == VARIABLES_DOMAIN && SYMBOL_CLASS (sym) != LOC_TYPEDEF && SYMBOL_CLASS (sym) != LOC_BLOCK && SYMBOL_CLASS (sym) != LOC_CONST) - || (kind == FUNCTIONS_NAMESPACE && SYMBOL_CLASS (sym) == LOC_BLOCK) - || (kind == TYPES_NAMESPACE && SYMBOL_CLASS (sym) == LOC_TYPEDEF) - || (kind == METHODS_NAMESPACE && SYMBOL_CLASS (sym) == LOC_BLOCK)))) + || (kind == FUNCTIONS_DOMAIN && SYMBOL_CLASS (sym) == LOC_BLOCK) + || (kind == TYPES_DOMAIN && SYMBOL_CLASS (sym) == LOC_TYPEDEF) + || (kind == METHODS_DOMAIN && SYMBOL_CLASS (sym) == LOC_BLOCK)))) { /* match */ psr = (struct symbol_search *) xmalloc (sizeof (struct symbol_search)); @@ -3128,7 +3128,7 @@ search_symbols (char *regexp, namespace_enum kind, int nfiles, char *files[], /* If there are no eyes, avoid all contact. I mean, if there are no debug symbols, then print directly from the msymbol_vector. */ - if (found_misc || kind != FUNCTIONS_NAMESPACE) + if (found_misc || kind != FUNCTIONS_DOMAIN) { ALL_MSYMBOLS (objfile, msymbol) { @@ -3141,12 +3141,12 @@ search_symbols (char *regexp, namespace_enum kind, int nfiles, char *files[], || re_exec (SYMBOL_NATURAL_NAME (msymbol)) != 0) { /* Functions: Look up by address. */ - if (kind != FUNCTIONS_NAMESPACE || + if (kind != FUNCTIONS_DOMAIN || (0 == find_pc_symtab (SYMBOL_VALUE_ADDRESS (msymbol)))) { /* Variables/Absolutes: Look up by name */ if (lookup_symbol (DEPRECATED_SYMBOL_NAME (msymbol), - (struct block *) NULL, VAR_NAMESPACE, + (struct block *) NULL, VAR_DOMAIN, 0, (struct symtab **) NULL) == NULL) { /* match */ @@ -3181,7 +3181,7 @@ search_symbols (char *regexp, namespace_enum kind, int nfiles, char *files[], regarding the match to gdb_stdout. */ static void -print_symbol_info (namespace_enum kind, struct symtab *s, struct symbol *sym, +print_symbol_info (domain_enum kind, struct symtab *s, struct symbol *sym, int block, char *last) { if (last == NULL || strcmp (last, s->filename) != 0) @@ -3191,17 +3191,17 @@ print_symbol_info (namespace_enum kind, struct symtab *s, struct symbol *sym, fputs_filtered (":\n", gdb_stdout); } - if (kind != TYPES_NAMESPACE && block == STATIC_BLOCK) + if (kind != TYPES_DOMAIN && block == STATIC_BLOCK) printf_filtered ("static "); /* Typedef that is not a C++ class */ - if (kind == TYPES_NAMESPACE - && SYMBOL_NAMESPACE (sym) != STRUCT_NAMESPACE) + if (kind == TYPES_DOMAIN + && SYMBOL_DOMAIN (sym) != STRUCT_DOMAIN) typedef_print (SYMBOL_TYPE (sym), sym, gdb_stdout); /* variable, func, or typedef-that-is-c++-class */ - else if (kind < TYPES_NAMESPACE || - (kind == TYPES_NAMESPACE && - SYMBOL_NAMESPACE (sym) == STRUCT_NAMESPACE)) + else if (kind < TYPES_DOMAIN || + (kind == TYPES_DOMAIN && + SYMBOL_DOMAIN (sym) == STRUCT_DOMAIN)) { type_print (SYMBOL_TYPE (sym), (SYMBOL_CLASS (sym) == LOC_TYPEDEF @@ -3237,7 +3237,7 @@ print_msymbol_info (struct minimal_symbol *msymbol) matches. */ static void -symtab_symbol_info (char *regexp, namespace_enum kind, int from_tty) +symtab_symbol_info (char *regexp, domain_enum kind, int from_tty) { static char *classnames[] = @@ -3255,7 +3255,7 @@ symtab_symbol_info (char *regexp, namespace_enum kind, int from_tty) printf_filtered (regexp ? "All %ss matching regular expression \"%s\":\n" : "All defined %ss:\n", - classnames[(int) (kind - VARIABLES_NAMESPACE)], regexp); + classnames[(int) (kind - VARIABLES_DOMAIN)], regexp); for (p = symbols; p != NULL; p = p->next) { @@ -3287,20 +3287,20 @@ symtab_symbol_info (char *regexp, namespace_enum kind, int from_tty) static void variables_info (char *regexp, int from_tty) { - symtab_symbol_info (regexp, VARIABLES_NAMESPACE, from_tty); + symtab_symbol_info (regexp, VARIABLES_DOMAIN, from_tty); } static void functions_info (char *regexp, int from_tty) { - symtab_symbol_info (regexp, FUNCTIONS_NAMESPACE, from_tty); + symtab_symbol_info (regexp, FUNCTIONS_DOMAIN, from_tty); } static void types_info (char *regexp, int from_tty) { - symtab_symbol_info (regexp, TYPES_NAMESPACE, from_tty); + symtab_symbol_info (regexp, TYPES_DOMAIN, from_tty); } /* Breakpoint all functions matching regular expression. */ @@ -3318,7 +3318,7 @@ rbreak_command (char *regexp, int from_tty) struct symbol_search *p; struct cleanup *old_chain; - search_symbols (regexp, FUNCTIONS_NAMESPACE, 0, (char **) NULL, &ss); + search_symbols (regexp, FUNCTIONS_DOMAIN, 0, (char **) NULL, &ss); old_chain = make_cleanup_free_search_symbols (ss); for (p = ss; p != NULL; p = p->next) @@ -3333,7 +3333,7 @@ rbreak_command (char *regexp, int from_tty) strcat (string, DEPRECATED_SYMBOL_NAME (p->symbol)); strcat (string, "'"); break_command (string, from_tty); - print_symbol_info (FUNCTIONS_NAMESPACE, + print_symbol_info (FUNCTIONS_DOMAIN, p->symtab, p->symbol, p->block, @@ -4102,9 +4102,9 @@ make_symbol_overload_list (struct symbol *fsym) if (ps->readin) continue; - if ((lookup_partial_symbol (ps, oload_name, NULL, 1, VAR_NAMESPACE) + if ((lookup_partial_symbol (ps, oload_name, NULL, 1, VAR_DOMAIN) != NULL) - || (lookup_partial_symbol (ps, oload_name, NULL, 0, VAR_NAMESPACE) + || (lookup_partial_symbol (ps, oload_name, NULL, 0, VAR_DOMAIN) != NULL)) PSYMTAB_TO_SYMTAB (ps); } diff --git a/gdb/symtab.h b/gdb/symtab.h index 4330b96..000ae0e 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -328,50 +328,50 @@ struct minimal_symbol /* Represent one symbol name; a variable, constant, function or typedef. */ -/* Different name spaces for symbols. Looking up a symbol specifies a - namespace and ignores symbol definitions in other name spaces. */ +/* Different name domains for symbols. Looking up a symbol specifies a + domain and ignores symbol definitions in other name domains. */ typedef enum { - /* UNDEF_NAMESPACE is used when a namespace has not been discovered or + /* UNDEF_DOMAIN is used when a domain has not been discovered or none of the following apply. This usually indicates an error either in the symbol information or in gdb's handling of symbols. */ - UNDEF_NAMESPACE, + UNDEF_DOMAIN, - /* VAR_NAMESPACE is the usual namespace. In C, this contains variables, + /* VAR_DOMAIN is the usual domain. In C, this contains variables, function names, typedef names and enum type values. */ - VAR_NAMESPACE, + VAR_DOMAIN, - /* STRUCT_NAMESPACE is used in C to hold struct, union and enum type names. + /* STRUCT_DOMAIN is used in C to hold struct, union and enum type names. Thus, if `struct foo' is used in a C program, it produces a symbol named - `foo' in the STRUCT_NAMESPACE. */ + `foo' in the STRUCT_DOMAIN. */ - STRUCT_NAMESPACE, + STRUCT_DOMAIN, - /* LABEL_NAMESPACE may be used for names of labels (for gotos); + /* LABEL_DOMAIN may be used for names of labels (for gotos); currently it is not used and labels are not recorded at all. */ - LABEL_NAMESPACE, + LABEL_DOMAIN, - /* Searching namespaces. These overlap with VAR_NAMESPACE, providing + /* Searching domains. These overlap with VAR_DOMAIN, providing some granularity with the search_symbols function. */ - /* Everything in VAR_NAMESPACE minus FUNCTIONS_-, TYPES_-, and - METHODS_NAMESPACE */ - VARIABLES_NAMESPACE, + /* Everything in VAR_DOMAIN minus FUNCTIONS_-, TYPES_-, and + METHODS_DOMAIN */ + VARIABLES_DOMAIN, /* All functions -- for some reason not methods, though. */ - FUNCTIONS_NAMESPACE, + FUNCTIONS_DOMAIN, /* All defined types */ - TYPES_NAMESPACE, + TYPES_DOMAIN, /* All class methods -- why is this separated out? */ - METHODS_NAMESPACE + METHODS_DOMAIN } -namespace_enum; +domain_enum; /* An address-class says where to find the value of a symbol. */ @@ -427,8 +427,8 @@ enum address_class LOC_LOCAL, - /* Value not used; definition in SYMBOL_TYPE. Symbols in the namespace - STRUCT_NAMESPACE all have this class. */ + /* Value not used; definition in SYMBOL_TYPE. Symbols in the domain + STRUCT_DOMAIN all have this class. */ LOC_TYPEDEF, @@ -593,14 +593,9 @@ struct symbol struct type *type; - /* Name space code. */ + /* Domain code. */ -#ifdef __MFC4__ - /* FIXME: don't conflict with C++'s namespace */ - /* would be safer to do a global change for all namespace identifiers. */ -#define namespace _namespace -#endif - namespace_enum namespace BYTE_BITFIELD; + domain_enum domain BYTE_BITFIELD; /* Address class */ @@ -656,7 +651,7 @@ struct symbol }; -#define SYMBOL_NAMESPACE(symbol) (symbol)->namespace +#define SYMBOL_DOMAIN(symbol) (symbol)->domain #define SYMBOL_CLASS(symbol) (symbol)->aclass #define SYMBOL_TYPE(symbol) (symbol)->type #define SYMBOL_LINE(symbol) (symbol)->line @@ -667,7 +662,7 @@ struct symbol #define SYMBOL_LOCATION_BATON(symbol) (symbol)->aux_value.loc.baton #define SYMBOL_LOCATION_FUNCS(symbol) (symbol)->aux_value.loc.funcs -/* A partial_symbol records the name, namespace, and address class of +/* A partial_symbol records the name, domain, and address class of symbols whose types we have not parsed yet. For functions, it also contains their memory address, so we can find them from a PC value. Each partial_symbol sits in a partial_symtab, all of which are chained @@ -683,7 +678,7 @@ struct partial_symbol /* Name space code. */ - namespace_enum namespace BYTE_BITFIELD; + domain_enum domain BYTE_BITFIELD; /* Address class (for info_symbols) */ @@ -691,7 +686,7 @@ struct partial_symbol }; -#define PSYMBOL_NAMESPACE(psymbol) (psymbol)->namespace +#define PSYMBOL_DOMAIN(psymbol) (psymbol)->domain #define PSYMBOL_CLASS(psymbol) (psymbol)->aclass @@ -1000,14 +995,14 @@ extern struct symtab *lookup_symtab (const char *); /* lookup a symbol by name (optional block, optional symtab) */ extern struct symbol *lookup_symbol (const char *, const struct block *, - const namespace_enum, int *, + const domain_enum, int *, struct symtab **); /* lookup a symbol by name, within a specified block */ extern struct symbol *lookup_block_symbol (const struct block *, const char *, const char *, - const namespace_enum); + const domain_enum); /* lookup a [struct, union, enum] by name, within a specified block */ @@ -1320,7 +1315,7 @@ struct symbol_search struct symbol_search *next; }; -extern void search_symbols (char *, namespace_enum, int, char **, +extern void search_symbols (char *, domain_enum, int, char **, struct symbol_search **); extern void free_search_symbols (struct symbol_search *); extern struct cleanup *make_cleanup_free_search_symbols (struct symbol_search diff --git a/gdb/valops.c b/gdb/valops.c index e54969c..3e85894 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -87,7 +87,7 @@ struct value * find_function_in_inferior (const char *name) { register struct symbol *sym; - sym = lookup_symbol (name, 0, VAR_NAMESPACE, 0, NULL); + sym = lookup_symbol (name, 0, VAR_DOMAIN, 0, NULL); if (sym != NULL) { if (SYMBOL_CLASS (sym) != LOC_BLOCK) @@ -2350,7 +2350,7 @@ value_struct_elt_for_reference (struct type *domain, int offset, else { struct symbol *s = lookup_symbol (TYPE_FN_FIELD_PHYSNAME (f, j), - 0, VAR_NAMESPACE, 0, NULL); + 0, VAR_DOMAIN, 0, NULL); if (s == NULL) { v = 0; @@ -2510,7 +2510,7 @@ value_of_local (const char *name, int complain) /* Calling lookup_block_symbol is necessary to get the LOC_REGISTER symbol instead of the LOC_ARG one (if both exist). */ - sym = lookup_block_symbol (b, name, NULL, VAR_NAMESPACE); + sym = lookup_block_symbol (b, name, NULL, VAR_DOMAIN); if (sym == NULL) { if (complain) diff --git a/gdb/values.c b/gdb/values.c index 88c6a61..db66766 100644 --- a/gdb/values.c +++ b/gdb/values.c @@ -794,7 +794,7 @@ value_static_field (struct type *type, int fieldno) else { char *phys_name = TYPE_FIELD_STATIC_PHYSNAME (type, fieldno); - struct symbol *sym = lookup_symbol (phys_name, 0, VAR_NAMESPACE, 0, NULL); + struct symbol *sym = lookup_symbol (phys_name, 0, VAR_DOMAIN, 0, NULL); if (sym == NULL) { /* With some compilers, e.g. HP aCC, static data members are reported @@ -968,7 +968,7 @@ value_fn_field (struct value **arg1p, struct fn_field *f, int j, struct type *ty struct symbol *sym; struct minimal_symbol *msym; - sym = lookup_symbol (physname, 0, VAR_NAMESPACE, 0, NULL); + sym = lookup_symbol (physname, 0, VAR_DOMAIN, 0, NULL); if (sym != NULL) { msym = NULL; diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c index dd6541a..5a0b286 100644 --- a/gdb/xcoffread.c +++ b/gdb/xcoffread.c @@ -1469,7 +1469,7 @@ process_xcoff_symbol (register struct coff_symbol *cs, struct objfile *objfile) /* default assumptions */ SYMBOL_VALUE_ADDRESS (sym) = cs->c_value + off; - SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; SYMBOL_SECTION (sym) = secnum_to_section (cs->c_secnum, objfile); if (ISFCN (cs->c_type)) @@ -2593,7 +2593,7 @@ scan_xcoff_symtab (struct objfile *objfile) namestring = STATIC_TRANSFORM_NAME (namestring); #endif add_psymbol_to_list (namestring, p - namestring, - VAR_NAMESPACE, LOC_STATIC, + VAR_DOMAIN, LOC_STATIC, &objfile->static_psymbols, 0, symbol.n_value, psymtab_language, objfile); @@ -2604,7 +2604,7 @@ scan_xcoff_symtab (struct objfile *objfile) /* The addresses in these entries are reported to be wrong. See the code that reads 'G's for symtabs. */ add_psymbol_to_list (namestring, p - namestring, - VAR_NAMESPACE, LOC_STATIC, + VAR_DOMAIN, LOC_STATIC, &objfile->global_psymbols, 0, symbol.n_value, psymtab_language, objfile); @@ -2622,7 +2622,7 @@ scan_xcoff_symtab (struct objfile *objfile) && namestring[0] != ' ')) { add_psymbol_to_list (namestring, p - namestring, - STRUCT_NAMESPACE, LOC_TYPEDEF, + STRUCT_DOMAIN, LOC_TYPEDEF, &objfile->static_psymbols, symbol.n_value, 0, psymtab_language, objfile); @@ -2630,7 +2630,7 @@ scan_xcoff_symtab (struct objfile *objfile) { /* Also a typedef with the same name. */ add_psymbol_to_list (namestring, p - namestring, - VAR_NAMESPACE, LOC_TYPEDEF, + VAR_DOMAIN, LOC_TYPEDEF, &objfile->static_psymbols, symbol.n_value, 0, psymtab_language, objfile); @@ -2646,7 +2646,7 @@ scan_xcoff_symtab (struct objfile *objfile) // OBSOLETE { // OBSOLETE /* Also a typedef with the same name. */ // OBSOLETE add_psymbol_to_list (namestring, p - namestring, -// OBSOLETE VAR_NAMESPACE, LOC_TYPEDEF, +// OBSOLETE VAR_DOMAIN, LOC_TYPEDEF, // OBSOLETE &objfile->static_psymbols, // OBSOLETE symbol.n_value, 0, // OBSOLETE psymtab_language, objfile); @@ -2659,7 +2659,7 @@ scan_xcoff_symtab (struct objfile *objfile) if (p != namestring) /* a name is there, not just :T... */ { add_psymbol_to_list (namestring, p - namestring, - VAR_NAMESPACE, LOC_TYPEDEF, + VAR_DOMAIN, LOC_TYPEDEF, &objfile->static_psymbols, symbol.n_value, 0, psymtab_language, objfile); @@ -2721,7 +2721,7 @@ scan_xcoff_symtab (struct objfile *objfile) /* Note that the value doesn't matter for enum constants in psymtabs, just in symtabs. */ add_psymbol_to_list (p, q - p, - VAR_NAMESPACE, LOC_CONST, + VAR_DOMAIN, LOC_CONST, &objfile->static_psymbols, 0, 0, psymtab_language, objfile); /* Point past the name. */ @@ -2739,7 +2739,7 @@ scan_xcoff_symtab (struct objfile *objfile) case 'c': /* Constant, e.g. from "const" in Pascal. */ add_psymbol_to_list (namestring, p - namestring, - VAR_NAMESPACE, LOC_CONST, + VAR_DOMAIN, LOC_CONST, &objfile->static_psymbols, symbol.n_value, 0, psymtab_language, objfile); continue; @@ -2756,7 +2756,7 @@ scan_xcoff_symtab (struct objfile *objfile) } symbol.n_value += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); add_psymbol_to_list (namestring, p - namestring, - VAR_NAMESPACE, LOC_BLOCK, + VAR_DOMAIN, LOC_BLOCK, &objfile->static_psymbols, 0, symbol.n_value, psymtab_language, objfile); @@ -2777,7 +2777,7 @@ scan_xcoff_symtab (struct objfile *objfile) } symbol.n_value += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); add_psymbol_to_list (namestring, p - namestring, - VAR_NAMESPACE, LOC_BLOCK, + VAR_DOMAIN, LOC_BLOCK, &objfile->global_psymbols, 0, symbol.n_value, psymtab_language, objfile); diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c index 7f170e9..e482119 100644 --- a/gdb/xstormy16-tdep.c +++ b/gdb/xstormy16-tdep.c @@ -648,7 +648,7 @@ xstormy16_skip_prologue (CORE_ADDR pc) return plg_end; /* Found a function. */ - sym = lookup_symbol (func_name, NULL, VAR_NAMESPACE, NULL, NULL); + sym = lookup_symbol (func_name, NULL, VAR_DOMAIN, NULL, NULL); /* Don't use line number debug info for assembly source files. */ if (sym && SYMBOL_LANGUAGE (sym) != language_asm) { |