* 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-12 Elena Zannoni <ezannoni@redhat.com>
* mi-mi-cmd-stack.c (list_args_or_locals): Rename VAR_NAMESPACE to
VAR_DOMAIN.
+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
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));
*/
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);
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 *);
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 *);
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);
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));
/* 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]))))
n_candidates = ada_lookup_symbol_list (exp->elts[pc + 2].name,
exp->elts[pc + 1].block,
- VAR_NAMESPACE,
+ VAR_DOMAIN,
&candidate_syms,
&candidate_blocks);
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)
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,
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;
}
{
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;
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);
{
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;
}
{
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);
{
struct partial_symbol *psym = start[i];
- if (SYMBOL_NAMESPACE (psym) == namespace)
+ if (SYMBOL_DOMAIN (psym) == domain)
{
int cmp;
}
/* 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
* 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
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));
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);
}
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
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;
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))
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)
{
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);
}
}
{
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);
}
}
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);
}
}
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;
}
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
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)
}
-/* 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
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;
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))
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);
{
struct symbol *sym = BLOCK_SYM (block, i);
- if (SYMBOL_NAMESPACE (sym) == namespace)
+ if (SYMBOL_DOMAIN (sym) == domain)
{
int cmp;
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)
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
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
{
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);
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)
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 *);
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);
}
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. */
{
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 =
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.",
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.",
sym =
lookup_symbol (name, (const struct block *) NULL,
- VAR_NAMESPACE, (int *) NULL,
+ VAR_DOMAIN, (int *) NULL,
(struct symtab **) NULL);
if (sym)
{
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);
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)
{
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)
{
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)
{
/* 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))
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)
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
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++;
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);
/* 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);
&& 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);
{
/* 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);
// 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);
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);
/* 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. */
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;
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);
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);
/*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);
}
/*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);
}
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);
}
/*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);
}
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;
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);
{
/* 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;
/* 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;
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
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),
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:
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
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);
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;
{
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;
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);
}
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);
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:
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);
}
}
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);
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);
{
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)
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)
{
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)
{
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)
{
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)
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);
{
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;
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);
}
/* 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;
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. */
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);
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;
/* 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);
/* 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);
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 */
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 */
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;
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;
{
/* 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
|| 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)
if (dn_bufp->dsvar.global)
{
add_psymbol_to_list (namestring, strlen (namestring),
- namespace, storage,
+ domain, storage,
&objfile->global_psymbols,
valu,
0, language_unknown, objfile);
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).
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);
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);
}
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;
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++;
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;
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;
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;
/* 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:
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;
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);
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,
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;
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)
{
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;
}
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);
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");
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);
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);
}
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);
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;
continue;
sym_arr[i1] = lookup_symbol (phys_name,
- NULL, VAR_NAMESPACE,
+ NULL, VAR_DOMAIN,
(int *) NULL,
(struct symtab **) NULL);
if (sym_arr[i1])
/* 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])
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;
/* 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);
p++;
*argptr = p;
- return lookup_symbol (copy, 0, STRUCT_NAMESPACE, 0,
+ return lookup_symbol (copy, 0, STRUCT_DOMAIN, 0,
(struct symtab **) NULL);
}
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++;
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. */
? 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,
{
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;
fblock : BLOCKNAME
{ struct symbol *sym
= lookup_symbol (copy_name ($1), expression_context_block,
- VAR_NAMESPACE, 0, NULL);
+ VAR_DOMAIN, 0, NULL);
$$ = sym;}
;
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));
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));
sym = lookup_symbol (copy_name ($1),
expression_context_block,
- VAR_NAMESPACE,
+ VAR_DOMAIN,
&is_a_field_of_this,
NULL);
if (sym)
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))
// OBSOLETE
// OBSOLETE sym = lookup_symbol (name,
// OBSOLETE (struct block *) NULL,
-// OBSOLETE VAR_NAMESPACE,
+// OBSOLETE VAR_DOMAIN,
// OBSOLETE (int *) NULL,
// OBSOLETE (struct symtab **) NULL);
// OBSOLETE
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 *);
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);
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:
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;
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)
¤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;
}
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;
/* 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 *)
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;
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)
{
#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);
#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)
{
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);
/* 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);
&& 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);
{
/* 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);
// 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);
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);
/* 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. */
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;
}
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);
}
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);
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);
&& 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);
}
/* 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:
}
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);
/* 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;
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;
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;
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;
block = BLOCK_SUPERBLOCK (block);
if (block)
- return mylookup_symbol (name, block, namespace, class);
+ return mylookup_symbol (name, block, domain, class);
return 0;
}
/* 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 */
* 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);
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;
+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.
struct symbol *sym2;
if (!locals)
sym2 = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym),
- block, VAR_NAMESPACE,
+ block, VAR_DOMAIN,
(int *) NULL,
(struct symtab **) NULL);
else
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. */
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)
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.",
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.",
sym =
lookup_symbol (name, (const struct block *) NULL,
- VAR_NAMESPACE, (int *) NULL,
+ VAR_DOMAIN, (int *) NULL,
(struct symtab **) NULL);
if (sym)
{
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
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)
{
{
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)
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)
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
/* 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));
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.",
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.",
sym =
lookup_symbol (name, (const struct block *) NULL,
- VAR_NAMESPACE, (int *) NULL,
+ VAR_DOMAIN, (int *) NULL,
(struct symtab **) NULL);
if (sym)
{
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;
}
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). */
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)
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)
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)
{
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)
{
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);
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);
}
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)
{
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
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
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);
/* 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];
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);
// 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);
// 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,
// 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);
{
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;
}
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;
/* 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;
/* 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. */
/* 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;
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.
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;
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)
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;
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
}
}
#endif
- SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
+ SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
add_symbol_to_list (sym, &file_symbols);
break;
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
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));
*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));
}
}
#endif
- SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
+ SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
add_symbol_to_list (sym, &local_symbols);
break;
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;
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;
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 */
// 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;
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;
}
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))
{
// 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,
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;
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))
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;
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 */
}
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);
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 */
}
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);
/* #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,
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);
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)))
{
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))
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 `");
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 `");
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);
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);
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);
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);
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
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
}
/* 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.
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;
}
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);
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;
/* 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;
/* 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. */
* 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. */
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;
if (static_block != NULL)
{
sym = lookup_symbol_aux_block (name, mangled_name, static_block,
- namespace, symtab);
+ domain, symtab);
if (sym != NULL)
return sym;
}
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;
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)
#endif
sym = lookup_symbol_aux_psymtabs (GLOBAL_BLOCK, name, mangled_name,
- namespace, symtab);
+ domain, symtab);
if (sym != NULL)
return sym;
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;
sym = lookup_symbol_aux_minsyms (name, mangled_name,
- namespace, is_a_field_of_this,
+ domain, is_a_field_of_this,
symtab);
if (sym != NULL)
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)
{
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;
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;
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;
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;
{
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;
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;
{
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
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",
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)
{
struct minimal_symbol *msymbol;
struct symtab *s;
- if (namespace == VAR_NAMESPACE)
+ if (domain == VAR_DOMAIN)
{
msymbol = lookup_minimal_symbol (name, NULL, NULL);
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
/* 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);
}
}
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;
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;
? 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);
}
{
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
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 *
{
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);
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
* 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\
{
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);
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
* 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\
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);
}
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
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;
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)))
/* 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
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)))
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)))
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.
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;
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;
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;
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)
{
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;
}
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));
/* 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)
{
|| 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 */
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)
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
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[]
=
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)
{
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. */
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)
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,
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);
}
/* 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. */
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,
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 */
};
-#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
#define SYMBOL_LOCATION_BATON(symbol) (symbol)->aux_value.loc.baton
#define SYMBOL_LOCATION_FUNCS(symbol) (symbol)->aux_value.loc.funcs
\f
-/* 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
/* Name space code. */
- namespace_enum namespace BYTE_BITFIELD;
+ domain_enum domain BYTE_BITFIELD;
/* Address class (for info_symbols) */
};
-#define PSYMBOL_NAMESPACE(psymbol) (psymbol)->namespace
+#define PSYMBOL_DOMAIN(psymbol) (psymbol)->domain
#define PSYMBOL_CLASS(psymbol) (psymbol)->aclass
\f
/* 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 */
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
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)
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;
/* 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)
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
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;
/* 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))
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);
/* 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);
&& 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);
{
/* 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);
// 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);
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);
/* 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. */
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;
}
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);
}
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);
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)
{