* symtab.h (SYMBOL_NATURAL_NAME): New macro.
(SYMBOL_LINKAGE_NAME): Ditto.
(SYMBOL_PRINT_NAME): Use SYMBOL_NATURAL_NAME and
SYMBOL_LINKAGE_NAME.
(struct general_symbol_info): Expand comment.
(DEPRECATED_SYMBOL_NAME): Rename from SYMBOL_NAME.
(SYMBOL_MATCHES_NAME): Use DEPRECATED_SYMBOL_NAME.
(SYMBOL_MATCHES_REGEXP): Ditto.
* symtab.c (symbol_natural_name): New function.
* objfiles.h: Replace all uses of SYMBOL_NAME by
DEPRECATED_SYMBOL_NAME.
* xcoffread.c, valops.c, typeprint.c, tracepoint.c: Ditto.
* symtab.c, symmisc.c, symfile.c, stack.c, stabsread.c: Ditto.
* somsolib.c, sol-thread.c, rs6000-tdep.c, p-valprint.c: Ditto.
* printcmd.c, objfiles.c, objc-lang.c, mipsread.c: Ditto.
* minsyms.c, mdebugread.c, linespec.c, jv-lang.c: Ditto.
* i386-tdep.c, i386-linux-tdep.c, hpread.c, hppa-tdep.c: Ditto.
* gnu-v2-abi.c, f-valprint.c, findvar.c, expprint.c: Ditto.
* dwarfread.c, dwarf2read.c, dbxread.c, c-valprint.c: Ditto.
* cp-valprint.c, coffread.c, buildsym.c, breakpoint.c: Ditto.
* blockframe.c, ax-gdb.c, arm-linux-tdep.c, ada-lang.c: Ditto.
* ada-exp.y: Ditto.
* ada-exp.y: Update copyright.
* sol-thread.c, mipsread.c, jv-lang.c, f-valprint.c: Ditto.
* cp-valprint.c: Ditto.
2003-02-25 David Carlton <carlton@math.stanford.edu>
* generic/gdbtk.h: Replace all instances of SYMBOL_NAME by
DEPRECATED_SYMBOL_NAME.
* generic/gdbtk-stack.c, generic/gdbtk-cmds.c: Ditto.
* generic/gdbtk-stack.c, generic/gdbtk-cmds.c: Update copyright.
2003-02-25 David Carlton <carlton@math.stanford.edu>
* mi-cmd-stack.c: Replace all instances of SYMBOL_NAME with
DEPRECATED_SYMBOL_NAME. Update copyright.
+2003-02-25 David Carlton <carlton@math.stanford.edu>
+
+ * symtab.h (SYMBOL_NATURAL_NAME): New macro.
+ (SYMBOL_LINKAGE_NAME): Ditto.
+ (SYMBOL_PRINT_NAME): Use SYMBOL_NATURAL_NAME and
+ SYMBOL_LINKAGE_NAME.
+ (struct general_symbol_info): Expand comment.
+ (DEPRECATED_SYMBOL_NAME): Rename from SYMBOL_NAME.
+ (SYMBOL_MATCHES_NAME): Use DEPRECATED_SYMBOL_NAME.
+ (SYMBOL_MATCHES_REGEXP): Ditto.
+ * symtab.c (symbol_natural_name): New function.
+ * objfiles.h: Replace all uses of SYMBOL_NAME by
+ DEPRECATED_SYMBOL_NAME.
+ * xcoffread.c, valops.c, typeprint.c, tracepoint.c: Ditto.
+ * symtab.c, symmisc.c, symfile.c, stack.c, stabsread.c: Ditto.
+ * somsolib.c, sol-thread.c, rs6000-tdep.c, p-valprint.c: Ditto.
+ * printcmd.c, objfiles.c, objc-lang.c, mipsread.c: Ditto.
+ * minsyms.c, mdebugread.c, linespec.c, jv-lang.c: Ditto.
+ * i386-tdep.c, i386-linux-tdep.c, hpread.c, hppa-tdep.c: Ditto.
+ * gnu-v2-abi.c, f-valprint.c, findvar.c, expprint.c: Ditto.
+ * dwarfread.c, dwarf2read.c, dbxread.c, c-valprint.c: Ditto.
+ * cp-valprint.c, coffread.c, buildsym.c, breakpoint.c: Ditto.
+ * blockframe.c, ax-gdb.c, arm-linux-tdep.c, ada-lang.c: Ditto.
+ * ada-exp.y: Ditto.
+ * ada-exp.y: Update copyright.
+ * sol-thread.c, mipsread.c, jv-lang.c, f-valprint.c: Ditto.
+ * cp-valprint.c: Ditto.
+
2003-02-25 Jeff Johnston <jjohnstn@redhat.com>
* infptrace.c (detach): Do not flag error if ptrace detach fails
/* YACC parser for Ada expressions, for GDB.
- Copyright (C) 1986, 1989, 1990, 1991, 1993, 1994, 1997, 2000
+ Copyright (C) 1986, 1989, 1990, 1991, 1993, 1994, 1997, 2000, 2003
Free Software Foundation, Inc.
This file is part of GDB.
struct block* orig_left_context;
struct symbol* renaming;
{
- const char* qualification = SYMBOL_NAME (renaming);
+ const char* qualification = DEPRECATED_SYMBOL_NAME (renaming);
const char* simple_tail;
const char* expr = TYPE_FIELD_NAME (SYMBOL_TYPE (renaming), 0);
const char* suffix;
BadEncoding:
error ("Internal error in encoding of renaming declaration: %s",
- SYMBOL_NAME (renaming));
+ DEPRECATED_SYMBOL_NAME (renaming));
}
/* Convert the character literal whose ASCII value would be VAL to the
if (SYMBOL_NAMESPACE (sym) == STRUCT_NAMESPACE)
return 1;
else
- return is_suppressed_name (SYMBOL_NAME (sym));
+ return is_suppressed_name (DEPRECATED_SYMBOL_NAME (sym));
}
\f
for (j = i - 1; j >= 0; j -= 1)
{
- if (mangled_ordered_before (SYMBOL_NAME (syms[j]),
- SYMBOL_NAME (sym)))
+ if (mangled_ordered_before (DEPRECATED_SYMBOL_NAME (syms[j]),
+ DEPRECATED_SYMBOL_NAME (sym)))
break;
syms[j + 1] = syms[j];
blocks[j + 1] = blocks[j];
{
struct type *type0 = SYMBOL_TYPE (sym0);
struct type *type1 = SYMBOL_TYPE (sym1);
- char *name0 = SYMBOL_NAME (sym0);
- char *name1 = SYMBOL_NAME (sym1);
+ char *name0 = DEPRECATED_SYMBOL_NAME (sym0);
+ char *name1 = DEPRECATED_SYMBOL_NAME (sym1);
int len0 = strlen (name0);
return
TYPE_CODE (type0) == TYPE_CODE (type1)
struct partial_symbol *psym = start[i];
if (SYMBOL_NAMESPACE (psym) == namespace &&
- wild_match (name, name_len, SYMBOL_NAME (psym)))
+ wild_match (name, name_len, DEPRECATED_SYMBOL_NAME (psym)))
return psym;
}
return NULL;
{
int M = (U + i) >> 1;
struct partial_symbol *psym = start[M];
- if (SYMBOL_NAME (psym)[0] < name[0])
+ if (DEPRECATED_SYMBOL_NAME (psym)[0] < name[0])
i = M + 1;
- else if (SYMBOL_NAME (psym)[0] > name[0])
+ else if (DEPRECATED_SYMBOL_NAME (psym)[0] > name[0])
U = M - 1;
- else if (strcmp (SYMBOL_NAME (psym), name) < 0)
+ else if (strcmp (DEPRECATED_SYMBOL_NAME (psym), name) < 0)
i = M + 1;
else
U = M;
if (SYMBOL_NAMESPACE (psym) == namespace)
{
- int cmp = strncmp (name, SYMBOL_NAME (psym), name_len);
+ int cmp = strncmp (name, DEPRECATED_SYMBOL_NAME (psym), name_len);
if (cmp < 0)
{
break;
}
else if (cmp == 0
- && is_name_suffix (SYMBOL_NAME (psym) + name_len))
+ && is_name_suffix (DEPRECATED_SYMBOL_NAME (psym) + name_len))
return psym;
}
i += 1;
{
int M = (U + i) >> 1;
struct partial_symbol *psym = start[M];
- if (SYMBOL_NAME (psym)[0] < '_')
+ if (DEPRECATED_SYMBOL_NAME (psym)[0] < '_')
i = M + 1;
- else if (SYMBOL_NAME (psym)[0] > '_')
+ else if (DEPRECATED_SYMBOL_NAME (psym)[0] > '_')
U = M - 1;
- else if (strcmp (SYMBOL_NAME (psym), "_ada_") < 0)
+ else if (strcmp (DEPRECATED_SYMBOL_NAME (psym), "_ada_") < 0)
i = M + 1;
else
U = M;
{
int cmp;
- cmp = (int) '_' - (int) SYMBOL_NAME (psym)[0];
+ cmp = (int) '_' - (int) DEPRECATED_SYMBOL_NAME (psym)[0];
if (cmp == 0)
{
- cmp = strncmp ("_ada_", SYMBOL_NAME (psym), 5);
+ cmp = strncmp ("_ada_", DEPRECATED_SYMBOL_NAME (psym), 5);
if (cmp == 0)
- cmp = strncmp (name, SYMBOL_NAME (psym) + 5, name_len);
+ cmp = strncmp (name, DEPRECATED_SYMBOL_NAME (psym) + 5, name_len);
}
if (cmp < 0)
break;
}
else if (cmp == 0
- && is_name_suffix (SYMBOL_NAME (psym) + name_len + 5))
+ && is_name_suffix (DEPRECATED_SYMBOL_NAME (psym) + name_len + 5))
return psym;
}
i += 1;
ALL_MSYMBOLS (objfile, msymbol)
{
- if (ada_match_name (SYMBOL_NAME (msymbol), name, wild_match)
+ if (ada_match_name (DEPRECATED_SYMBOL_NAME (msymbol), name, wild_match)
&& MSYMBOL_TYPE (msymbol) != mst_solib_trampoline)
return msymbol;
}
/* Initialize the local variable symbol that stands for the
* static link (when it exists). */
static_link = &static_link_sym;
- SYMBOL_NAME (static_link) = "";
+ DEPRECATED_SYMBOL_NAME (static_link) = "";
SYMBOL_LANGUAGE (static_link) = language_unknown;
SYMBOL_CLASS (static_link) = LOC_LOCAL;
SYMBOL_NAMESPACE (static_link) = VAR_NAMESPACE;
i = 0;
while (i < nsyms)
{
- if (SYMBOL_NAME (syms[i]) != NULL
+ if (DEPRECATED_SYMBOL_NAME (syms[i]) != NULL
&& SYMBOL_CLASS (syms[i]) == LOC_STATIC
&& is_nondebugging_type (SYMBOL_TYPE (syms[i])))
{
for (j = 0; j < nsyms; j += 1)
{
if (i != j
- && SYMBOL_NAME (syms[j]) != NULL
- && STREQ (SYMBOL_NAME (syms[i]), SYMBOL_NAME (syms[j]))
+ && DEPRECATED_SYMBOL_NAME (syms[j]) != NULL
+ && STREQ (DEPRECATED_SYMBOL_NAME (syms[i]), DEPRECATED_SYMBOL_NAME (syms[j]))
&& SYMBOL_CLASS (syms[i]) == SYMBOL_CLASS (syms[j])
&& SYMBOL_VALUE_ADDRESS (syms[i])
== SYMBOL_VALUE_ADDRESS (syms[j]))
{
ALL_MSYMBOLS (objfile, msymbol)
{
- if (ada_match_name (SYMBOL_NAME (msymbol), name, wild_match))
+ if (ada_match_name (DEPRECATED_SYMBOL_NAME (msymbol), name, wild_match))
{
switch (MSYMBOL_TYPE (msymbol))
{
bv = BLOCKVECTOR (s);
block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
ada_add_block_symbols (block,
- SYMBOL_NAME (msymbol),
+ DEPRECATED_SYMBOL_NAME (msymbol),
namespace, objfile, wild_match);
if (ndefns == old_ndefns)
{
block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
ada_add_block_symbols (block,
- SYMBOL_NAME (msymbol),
+ DEPRECATED_SYMBOL_NAME (msymbol),
namespace, objfile,
wild_match);
}
ALL_BLOCK_SYMBOLS (block, i, sym)
{
if (SYMBOL_NAMESPACE (sym) == namespace &&
- wild_match (name, name_len, SYMBOL_NAME (sym)))
+ wild_match (name, name_len, DEPRECATED_SYMBOL_NAME (sym)))
{
switch (SYMBOL_CLASS (sym))
{
{
int M = (U + i) >> 1;
struct symbol *sym = BLOCK_SYM (block, M);
- if (SYMBOL_NAME (sym)[0] < name[0])
+ if (DEPRECATED_SYMBOL_NAME (sym)[0] < name[0])
i = M + 1;
- else if (SYMBOL_NAME (sym)[0] > name[0])
+ else if (DEPRECATED_SYMBOL_NAME (sym)[0] > name[0])
U = M - 1;
- else if (strcmp (SYMBOL_NAME (sym), name) < 0)
+ else if (strcmp (DEPRECATED_SYMBOL_NAME (sym), name) < 0)
i = M + 1;
else
U = M;
{
if (SYMBOL_NAMESPACE (sym) == namespace)
{
- int cmp = strncmp (name, SYMBOL_NAME (sym), name_len);
+ int cmp = strncmp (name, DEPRECATED_SYMBOL_NAME (sym), name_len);
if (cmp < 0)
{
}
}
else if (cmp == 0
- && is_name_suffix (SYMBOL_NAME (sym) + name_len))
+ && is_name_suffix (DEPRECATED_SYMBOL_NAME (sym) + name_len))
{
switch (SYMBOL_CLASS (sym))
{
{
int M = (U + i) >> 1;
struct symbol *sym = BLOCK_SYM (block, M);
- if (SYMBOL_NAME (sym)[0] < '_')
+ if (DEPRECATED_SYMBOL_NAME (sym)[0] < '_')
i = M + 1;
- else if (SYMBOL_NAME (sym)[0] > '_')
+ else if (DEPRECATED_SYMBOL_NAME (sym)[0] > '_')
U = M - 1;
- else if (strcmp (SYMBOL_NAME (sym), "_ada_") < 0)
+ else if (strcmp (DEPRECATED_SYMBOL_NAME (sym), "_ada_") < 0)
i = M + 1;
else
U = M;
{
int cmp;
- cmp = (int) '_' - (int) SYMBOL_NAME (sym)[0];
+ cmp = (int) '_' - (int) DEPRECATED_SYMBOL_NAME (sym)[0];
if (cmp == 0)
{
- cmp = strncmp ("_ada_", SYMBOL_NAME (sym), 5);
+ cmp = strncmp ("_ada_", DEPRECATED_SYMBOL_NAME (sym), 5);
if (cmp == 0)
- cmp = strncmp (name, SYMBOL_NAME (sym) + 5, name_len);
+ cmp = strncmp (name, DEPRECATED_SYMBOL_NAME (sym) + 5, name_len);
}
if (cmp < 0)
}
}
else if (cmp == 0
- && is_name_suffix (SYMBOL_NAME (sym) + name_len + 5))
+ && is_name_suffix (DEPRECATED_SYMBOL_NAME (sym) + name_len + 5))
{
switch (SYMBOL_CLASS (sym))
{
TYPE_FIELD_STATIC_KIND (ftype, nargs) = 0;
TYPE_FIELD_TYPE (ftype, nargs) =
lookup_pointer_type (check_typedef (SYMBOL_TYPE (sym)));
- TYPE_FIELD_NAME (ftype, nargs) = SYMBOL_NAME (sym);
+ TYPE_FIELD_NAME (ftype, nargs) = DEPRECATED_SYMBOL_NAME (sym);
nargs += 1;
break;
TYPE_FIELD_BITSIZE (ftype, nargs) = 0;
TYPE_FIELD_STATIC_KIND (ftype, nargs) = 0;
TYPE_FIELD_TYPE (ftype, nargs) = check_typedef (SYMBOL_TYPE (sym));
- TYPE_FIELD_NAME (ftype, nargs) = SYMBOL_NAME (sym);
+ TYPE_FIELD_NAME (ftype, nargs) = DEPRECATED_SYMBOL_NAME (sym);
nargs += 1;
break;
fprintf (stderr, "Block: %p; [0x%lx, 0x%lx]",
b, BLOCK_START (b), BLOCK_END (b));
if (BLOCK_FUNCTION (b) != NULL)
- fprintf (stderr, " Function: %s", SYMBOL_NAME (BLOCK_FUNCTION (b)));
+ fprintf (stderr, " Function: %s", DEPRECATED_SYMBOL_NAME (BLOCK_FUNCTION (b)));
fprintf (stderr, "\n");
fprintf (stderr, "\t Superblock: %p\n", BLOCK_SUPERBLOCK (b));
fprintf (stderr, "\t Symbols:");
{
if (i > 0 && i % 4 == 0)
fprintf (stderr, "\n\t\t ");
- fprintf (stderr, " %s", SYMBOL_NAME (sym));
+ fprintf (stderr, " %s", DEPRECATED_SYMBOL_NAME (sym));
}
fprintf (stderr, "\n");
}
ALL_OBJFILE_MSYMBOLS (objfile, msym)
{
- if (SYMBOL_NAME (msym)
- && strcmp (SYMBOL_NAME (msym), name) == 0)
+ if (DEPRECATED_SYMBOL_NAME (msym)
+ && strcmp (DEPRECATED_SYMBOL_NAME (msym), name) == 0)
{
*objfile_p = objfile;
return msym;
case LOC_UNRESOLVED:
{
struct minimal_symbol *msym
- = lookup_minimal_symbol (SYMBOL_NAME (var), NULL, NULL);
+ = lookup_minimal_symbol (DEPRECATED_SYMBOL_NAME (var), NULL, NULL);
if (!msym)
error ("Couldn't resolve symbol `%s'.", SYMBOL_PRINT_NAME (var));
{
cache_pc_function_low = BLOCK_START (SYMBOL_BLOCK_VALUE (f));
cache_pc_function_high = BLOCK_END (SYMBOL_BLOCK_VALUE (f));
- cache_pc_function_name = SYMBOL_NAME (f);
+ cache_pc_function_name = DEPRECATED_SYMBOL_NAME (f);
cache_pc_function_section = section;
goto return_cached_value;
}
if (address)
*address = SYMBOL_VALUE_ADDRESS (psb);
if (name)
- *name = SYMBOL_NAME (psb);
+ *name = DEPRECATED_SYMBOL_NAME (psb);
/* endaddr non-NULL can't happen here. */
return 1;
}
}
cache_pc_function_low = SYMBOL_VALUE_ADDRESS (msymbol);
- cache_pc_function_name = SYMBOL_NAME (msymbol);
+ cache_pc_function_name = DEPRECATED_SYMBOL_NAME (msymbol);
cache_pc_function_section = section;
/* Use the lesser of the next minimal symbol in the same section, or
other sections, to find the next symbol in this section with
a different address. */
- for (i = 1; SYMBOL_NAME (msymbol + i) != NULL; i++)
+ for (i = 1; DEPRECATED_SYMBOL_NAME (msymbol + i) != NULL; i++)
{
if (SYMBOL_VALUE_ADDRESS (msymbol + i) != SYMBOL_VALUE_ADDRESS (msymbol)
&& SYMBOL_BFD_SECTION (msymbol + i) == SYMBOL_BFD_SECTION (msymbol))
break;
}
- if (SYMBOL_NAME (msymbol + i) != NULL
+ if (DEPRECATED_SYMBOL_NAME (msymbol + i) != NULL
&& SYMBOL_VALUE_ADDRESS (msymbol + i) < osect->endaddr)
cache_pc_function_high = SYMBOL_VALUE_ADDRESS (msymbol + i);
else
ALL_BLOCK_SYMBOLS (b, i, sym)
{
- if (STREQ (SYMBOL_NAME (sym), "default"))
+ if (STREQ (DEPRECATED_SYMBOL_NAME (sym), "default"))
{
if (have_default)
continue;
{
for (j = list->nsyms; --j >= 0;)
{
- pp = SYMBOL_NAME (list->symbol[j]);
+ pp = DEPRECATED_SYMBOL_NAME (list->symbol[j]);
if (*pp == *name && strncmp (pp, name, length) == 0 &&
pp[length] == '\0')
{
unsigned int hash_index;
const char *name = SYMBOL_DEMANGLED_NAME (next->symbol[j]);
if (name == NULL)
- name = SYMBOL_NAME (next->symbol[j]);
+ name = DEPRECATED_SYMBOL_NAME (next->symbol[j]);
hash_index = msymbol_hash_iw (name);
hash_index = hash_index % BLOCK_BUCKETS (block);
sym = BLOCK_BUCKET (block, hash_index);
int is_this_fld;
if (msymbol != NULL)
- wsym = lookup_symbol (SYMBOL_NAME (msymbol), block,
+ wsym = lookup_symbol (DEPRECATED_SYMBOL_NAME (msymbol), block,
VAR_NAMESPACE, &is_this_fld, &s);
if (wsym)
TYPE_CODE (SYMBOL_TYPE (real_sym)) == TYPE_CODE_PTR &&
TYPE_LENGTH (TYPE_TARGET_TYPE (SYMBOL_TYPE (real_sym))) != 0)
{
- register char *name = SYMBOL_NAME (real_sym);
+ register char *name = DEPRECATED_SYMBOL_NAME (real_sym);
register int hash = hashname (name);
register struct symbol *sym, *prev;
prev = 0;
for (sym = opaque_type_chain[hash]; sym;)
{
- if (name[0] == SYMBOL_NAME (sym)[0] &&
- STREQ (name + 1, SYMBOL_NAME (sym) + 1))
+ if (name[0] == DEPRECATED_SYMBOL_NAME (sym)[0] &&
+ STREQ (name + 1, DEPRECATED_SYMBOL_NAME (sym) + 1))
{
if (prev)
{
}
else
TYPE_NAME (SYMBOL_TYPE (sym)) =
- concat (SYMBOL_NAME (sym), NULL);
+ concat (DEPRECATED_SYMBOL_NAME (sym), NULL);
}
#ifdef CXUX_TARGET
/* Ignore vendor section for Harris CX/UX targets. */
TYPE_CODE (TYPE_TARGET_TYPE (SYMBOL_TYPE (sym))) !=
TYPE_CODE_UNDEF)
{
- register int i = hashname (SYMBOL_NAME (sym));
+ register int i = hashname (DEPRECATED_SYMBOL_NAME (sym));
SYMBOL_VALUE_CHAIN (sym) = opaque_type_chain[i];
opaque_type_chain[i] = sym;
names for anonymous enums, structures, and unions, like
"~0fake" or ".0fake". Thanks, but no thanks... */
if (TYPE_TAG_NAME (SYMBOL_TYPE (sym)) == 0)
- if (SYMBOL_NAME (sym) != NULL
- && *SYMBOL_NAME (sym) != '~'
- && *SYMBOL_NAME (sym) != '.')
+ if (DEPRECATED_SYMBOL_NAME (sym) != NULL
+ && *DEPRECATED_SYMBOL_NAME (sym) != '~'
+ && *DEPRECATED_SYMBOL_NAME (sym) != '.')
TYPE_TAG_NAME (SYMBOL_TYPE (sym)) =
- concat (SYMBOL_NAME (sym), NULL);
+ concat (DEPRECATED_SYMBOL_NAME (sym), NULL);
add_symbol_to_list (sym, &file_symbols);
break;
sizeof (struct symbol));
memset (sym, 0, sizeof (struct symbol));
- SYMBOL_NAME (sym) =
+ DEPRECATED_SYMBOL_NAME (sym) =
obsavestring (name, strlen (name),
¤t_objfile->symbol_obstack);
SYMBOL_CLASS (sym) = LOC_CONST;
{
struct symbol *xsym = syms->symbol[j];
SYMBOL_TYPE (xsym) = type;
- TYPE_FIELD_NAME (type, n) = SYMBOL_NAME (xsym);
+ TYPE_FIELD_NAME (type, n) = DEPRECATED_SYMBOL_NAME (xsym);
TYPE_FIELD_BITPOS (type, n) = SYMBOL_VALUE (xsym);
if (SYMBOL_VALUE (xsym) < 0)
unsigned_enum = 0;
/* Support for printing C++ values for GDB, the GNU debugger.
Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
- 2000, 2001, 2002
+ 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GDB.
check_stub_method_group (domain, i);
for (j = 0; j < len2; j++)
{
- if (strcmp (SYMBOL_NAME (sym), TYPE_FN_FIELD_PHYSNAME (f, j))
+ if (strcmp (DEPRECATED_SYMBOL_NAME (sym), TYPE_FN_FIELD_PHYSNAME (f, j))
== 0)
goto common;
}
int l = colon_pos - name;
m = lookup_minimal_symbol_by_pc (last_pc_address);
- if (m && STREQN (SYMBOL_NAME (m), name, l)
- && SYMBOL_NAME (m)[l] == '\0')
+ if (m && STREQN (DEPRECATED_SYMBOL_NAME (m), name, l)
+ && DEPRECATED_SYMBOL_NAME (m)[l] == '\0')
/* last_pc_address was in this function */
valu = SYMBOL_VALUE (m);
- else if (m && SYMBOL_NAME (m + 1)
- && STREQN (SYMBOL_NAME (m + 1), name, l)
- && SYMBOL_NAME (m + 1)[l] == '\0')
+ else if (m && DEPRECATED_SYMBOL_NAME (m + 1)
+ && STREQN (DEPRECATED_SYMBOL_NAME (m + 1), name, l)
+ && DEPRECATED_SYMBOL_NAME (m + 1)[l] == '\0')
/* last_pc_address was in last function */
valu = SYMBOL_VALUE (m + 1);
else
* sizeof (struct field));
}
- FIELD_NAME (fields[num_fields]) = SYMBOL_NAME (sym);
+ FIELD_NAME (fields[num_fields]) = DEPRECATED_SYMBOL_NAME (sym);
FIELD_TYPE (fields[num_fields]) = NULL;
FIELD_BITPOS (fields[num_fields]) = SYMBOL_VALUE (sym);
FIELD_BITSIZE (fields[num_fields]) = 0;
SYMBOL_NAMESPACE (typedef_sym) = VAR_NAMESPACE;
if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0)
TYPE_NAME (SYMBOL_TYPE (sym)) =
- obsavestring (SYMBOL_NAME (sym),
- strlen (SYMBOL_NAME (sym)),
+ obsavestring (DEPRECATED_SYMBOL_NAME (sym),
+ strlen (DEPRECATED_SYMBOL_NAME (sym)),
&objfile->type_obstack);
add_symbol_to_list (typedef_sym, list_in_scope);
}
{
case DW_FORM_addr:
if (TYPE_LENGTH (SYMBOL_TYPE (sym)) != cu_header->addr_size)
- dwarf2_const_value_length_mismatch_complaint (SYMBOL_NAME (sym),
+ dwarf2_const_value_length_mismatch_complaint (DEPRECATED_SYMBOL_NAME (sym),
cu_header->addr_size,
TYPE_LENGTH (SYMBOL_TYPE
(sym)));
case DW_FORM_block:
blk = DW_BLOCK (attr);
if (TYPE_LENGTH (SYMBOL_TYPE (sym)) != blk->size)
- dwarf2_const_value_length_mismatch_complaint (SYMBOL_NAME (sym),
+ dwarf2_const_value_length_mismatch_complaint (DEPRECATED_SYMBOL_NAME (sym),
blk->size,
TYPE_LENGTH (SYMBOL_TYPE
(sym)));
sym = (struct symbol *) obstack_alloc (&objfile->symbol_obstack,
sizeof (struct symbol));
memset (sym, 0, sizeof (struct symbol));
- SYMBOL_NAME (sym) = create_name (list->field.name,
+ DEPRECATED_SYMBOL_NAME (sym) = create_name (list->field.name,
&objfile->symbol_obstack);
SYMBOL_INIT_LANGUAGE_SPECIFIC (sym, cu_language);
SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
obstack_alloc (&objfile->symbol_obstack, sizeof (struct symbol));
OBJSTAT (objfile, n_syms++);
memset (sym, 0, sizeof (struct symbol));
- SYMBOL_NAME (sym) = create_name (dip->at_name,
+ DEPRECATED_SYMBOL_NAME (sym) = create_name (dip->at_name,
&objfile->symbol_obstack);
SYMBOL_INIT_LANGUAGE_SPECIFIC (sym, cu_language);
SYMBOL_TYPE (sym) = type;
fprintf_filtered (stream, ", symbol @");
gdb_print_host_address (exp->elts[elt + 1].symbol, stream);
fprintf_filtered (stream, " (%s)",
- SYMBOL_NAME (exp->elts[elt + 1].symbol));
+ DEPRECATED_SYMBOL_NAME (exp->elts[elt + 1].symbol));
elt += 3;
break;
case OP_LAST:
/* Support for printing Fortran values for GDB, the GNU debugger.
- Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000
+ Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2003
Free Software Foundation, Inc.
Contributed by Motorola. Adapted from the C definitions by Farooq Butt
(fmbutt@engage.sps.mot.com), additionally worked over by Stan Shebs.
if (msymbol != NULL
&& (SYMBOL_VALUE_ADDRESS (msymbol)
> BLOCK_START (SYMBOL_BLOCK_VALUE (func))))
- funname = SYMBOL_NAME (msymbol);
+ funname = DEPRECATED_SYMBOL_NAME (msymbol);
else
- funname = SYMBOL_NAME (func);
+ funname = DEPRECATED_SYMBOL_NAME (func);
}
else
{
lookup_minimal_symbol_by_pc (get_frame_pc (fi));
if (msymbol != NULL)
- funname = SYMBOL_NAME (msymbol);
+ funname = DEPRECATED_SYMBOL_NAME (msymbol);
}
/* If comname is NULL, we assume the user wishes to see the
while (entry != NULL)
{
- printf_filtered ("%s = ", SYMBOL_NAME (entry->symbol));
+ printf_filtered ("%s = ", DEPRECATED_SYMBOL_NAME (entry->symbol));
print_variable_value (entry->symbol, fi, gdb_stdout);
printf_filtered ("\n");
entry = entry->next;
if (msymbol != NULL
&& (SYMBOL_VALUE_ADDRESS (msymbol)
> BLOCK_START (SYMBOL_BLOCK_VALUE (func))))
- funname = SYMBOL_NAME (msymbol);
+ funname = DEPRECATED_SYMBOL_NAME (msymbol);
else
- funname = SYMBOL_NAME (func);
+ funname = DEPRECATED_SYMBOL_NAME (func);
}
else
{
lookup_minimal_symbol_by_pc (fi->pc);
if (msymbol != NULL)
- funname = SYMBOL_NAME (msymbol);
+ funname = DEPRECATED_SYMBOL_NAME (msymbol);
}
the_common = find_common_for_function (comname, funname);
{
struct minimal_symbol *msym;
- msym = lookup_minimal_symbol (SYMBOL_NAME (var), NULL, NULL);
+ msym = lookup_minimal_symbol (DEPRECATED_SYMBOL_NAME (var), NULL, NULL);
if (msym == NULL)
return 0;
if (overlay_debugging)
/* Try to find a symbol that is the vtable */
minsym=lookup_minimal_symbol_by_pc(vtbl);
if (minsym==NULL
- || (demangled_name=SYMBOL_NAME(minsym))==NULL
+ || (demangled_name=DEPRECATED_SYMBOL_NAME (minsym))==NULL
|| !is_vtable_name (demangled_name))
return NULL;
msym_us = lookup_minimal_symbol_by_pc (pc);
return (u->HP_UX_interrupt_marker
- && !PC_IN_SIGTRAMP (pc, SYMBOL_NAME (msym_us)));
+ && !PC_IN_SIGTRAMP (pc, DEPRECATED_SYMBOL_NAME (msym_us)));
}
/* Called when no unwind descriptor was found for PC. Returns 1 if it
if (u->Save_SP
&& !pc_in_interrupt_handler (pc)
&& msym_us
- && !PC_IN_SIGTRAMP (pc, SYMBOL_NAME (msym_us)))
+ && !PC_IN_SIGTRAMP (pc, DEPRECATED_SYMBOL_NAME (msym_us)))
return -1;
return u->Total_frame_size << 3;
pthread library itself, you'd get errors.
So for today, we don't make that check. */
- frame_symbol_name = SYMBOL_NAME (min_frame_symbol);
+ frame_symbol_name = DEPRECATED_SYMBOL_NAME (min_frame_symbol);
if (frame_symbol_name != 0)
{
if (0 == strncmp (frame_symbol_name,
msymbol = lookup_minimal_symbol ("__shldp", NULL, NULL);
symbol2 = lookup_symbol ("__shldp", NULL, VAR_NAMESPACE, NULL, NULL);
endo_buff_addr = SYMBOL_VALUE_ADDRESS (buff_minsym);
- namelen = strlen (SYMBOL_NAME (function));
+ namelen = strlen (DEPRECATED_SYMBOL_NAME (function));
value_return_addr = endo_buff_addr + namelen;
ftype = check_typedef (SYMBOL_TYPE (get_sym));
/* set up stuff needed by __d_shl_get in buffer in end.o */
- target_write_memory (endo_buff_addr, SYMBOL_NAME (function), namelen);
+ target_write_memory (endo_buff_addr, DEPRECATED_SYMBOL_NAME (function), namelen);
target_write_memory (value_return_addr, (char *) &tmp, 4);
{
stub_symbol
= lookup_minimal_symbol_solib_trampoline
- (SYMBOL_NAME (funsymbol), NULL, objfile);
+ (DEPRECATED_SYMBOL_NAME (funsymbol), NULL, objfile);
if (!stub_symbol)
- stub_symbol = lookup_minimal_symbol (SYMBOL_NAME (funsymbol),
+ stub_symbol = lookup_minimal_symbol (DEPRECATED_SYMBOL_NAME (funsymbol),
NULL, objfile);
/* Found a symbol with the right name. */
new_stub = find_stub_with_shl_get (fmsymbol, solib_handle);
if (new_stub == 0)
- error ("Can't find an import stub for %s", SYMBOL_NAME (fmsymbol));
+ error ("Can't find an import stub for %s", DEPRECATED_SYMBOL_NAME (fmsymbol));
/* We have to store the address of the stub in __shlib_funcptr. */
msymbol = lookup_minimal_symbol ("__shlib_funcptr", NULL,
return 1;
minsym = lookup_minimal_symbol_by_pc (pc);
- if (minsym && strcmp (SYMBOL_NAME (minsym), ".stub") == 0)
+ if (minsym && strcmp (DEPRECATED_SYMBOL_NAME (minsym), ".stub") == 0)
return 1;
/* Get the unwind descriptor corresponding to PC, return zero
ALL_MSYMBOLS (objfile, msymbol)
{
if (MSYMBOL_TYPE (msymbol) == mst_text
- && STREQ (SYMBOL_NAME (msymbol), SYMBOL_NAME (msym)))
+ && STREQ (DEPRECATED_SYMBOL_NAME (msymbol), DEPRECATED_SYMBOL_NAME (msym)))
{
function_found = 1;
break;
return orig_pc == pc ? 0 : pc & ~0x3;
}
- libsym = lookup_minimal_symbol (SYMBOL_NAME (stubsym), NULL, NULL);
+ libsym = lookup_minimal_symbol (DEPRECATED_SYMBOL_NAME (stubsym), NULL, NULL);
if (libsym == NULL)
{
warning ("Unable to find library symbol for %s\n",
- SYMBOL_NAME (stubsym));
+ DEPRECATED_SYMBOL_NAME (stubsym));
return orig_pc == pc ? 0 : pc & ~0x3;
}
sym = (struct symbol *) obstack_alloc (&objfile->symbol_obstack,
sizeof (struct symbol));
memset (sym, 0, sizeof (struct symbol));
- SYMBOL_NAME (sym) = obsavestring (name, strlen (name),
+ DEPRECATED_SYMBOL_NAME (sym) = obsavestring (name, strlen (name),
&objfile->symbol_obstack);
SYMBOL_CLASS (sym) = LOC_CONST;
SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
{
struct symbol *xsym = syms->symbol[j];
SYMBOL_TYPE (xsym) = type;
- TYPE_FIELD_NAME (type, n) = SYMBOL_NAME (xsym);
+ TYPE_FIELD_NAME (type, n) = DEPRECATED_SYMBOL_NAME (xsym);
TYPE_FIELD_BITPOS (type, n) = SYMBOL_VALUE (xsym);
TYPE_FIELD_BITSIZE (type, n) = 0;
TYPE_FIELD_STATIC_KIND (type, n) = 0;
sym = (struct symbol *) obstack_alloc (&objfile->symbol_obstack,
sizeof (struct symbol));
(void) memset (sym, 0, sizeof (struct symbol));
- SYMBOL_NAME (sym) = obsavestring (name, strlen (name),
+ DEPRECATED_SYMBOL_NAME (sym) = obsavestring (name, strlen (name),
&objfile->symbol_obstack);
/* Figure out where it lives. */
for (j = 0; j < syms->nsyms; j++, n++)
{
struct symbol *xsym = syms->symbol[j];
- TYPE_FIELD_NAME (type, n) = SYMBOL_NAME (xsym);
+ TYPE_FIELD_NAME (type, n) = DEPRECATED_SYMBOL_NAME (xsym);
TYPE_FIELD_TYPE (type, n) = SYMBOL_TYPE (xsym);
TYPE_FIELD_ARTIFICIAL (type, n) = 0;
TYPE_FIELD_BITSIZE (type, n) = 0;
sym = (struct symbol *) obstack_alloc (&objfile->symbol_obstack,
sizeof (struct symbol));
(void) memset (sym, 0, sizeof (struct symbol));
- SYMBOL_NAME (sym) = name;
+ DEPRECATED_SYMBOL_NAME (sym) = name;
/* Figure out where it lives. */
if (paramp->dfparam.regparam)
for (j = 0; j < syms->nsyms; j++, n++)
{
struct symbol *xsym = syms->symbol[j];
- TYPE_FIELD_NAME (type, n) = SYMBOL_NAME (xsym);
+ TYPE_FIELD_NAME (type, n) = DEPRECATED_SYMBOL_NAME (xsym);
TYPE_FIELD_TYPE (type, n) = SYMBOL_TYPE (xsym);
TYPE_FIELD_ARTIFICIAL (type, n) = 0;
TYPE_FIELD_BITSIZE (type, n) = 0;
sym = (struct symbol *) obstack_alloc (&objfile->symbol_obstack,
sizeof (struct symbol));
memset (sym, 0, sizeof (struct symbol));
- SYMBOL_NAME (sym) = obsavestring (name, strlen (name), &objfile->symbol_obstack);
+ DEPRECATED_SYMBOL_NAME (sym) = obsavestring (name, strlen (name), &objfile->symbol_obstack);
SYMBOL_LANGUAGE (sym) = language_auto;
SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
SYMBOL_LINE (sym) = 0;
if (SYMBOL_LANGUAGE (sym) == language_cplus)
TYPE_FLAGS (SYMBOL_TYPE (sym)) |= TYPE_FLAG_PROTOTYPED;
- /* The "SYMBOL_NAME" field is expected to be the mangled name
+ /* The "DEPRECATED_SYMBOL_NAME" field is expected to be the mangled name
* (if any), which we get from the "alias" field of the SOM record
* if that exists.
*/
if ((dn_bufp->dfunc.language == HP_LANGUAGE_CPLUSPLUS) &&
dn_bufp->dfunc.alias && /* has an alias */
*(char *) (VT (objfile) + dn_bufp->dfunc.alias)) /* not a null string */
- SYMBOL_NAME (sym) = VT (objfile) + dn_bufp->dfunc.alias;
+ DEPRECATED_SYMBOL_NAME (sym) = VT (objfile) + dn_bufp->dfunc.alias;
else
- SYMBOL_NAME (sym) = VT (objfile) + dn_bufp->dfunc.name;
+ DEPRECATED_SYMBOL_NAME (sym) = VT (objfile) + dn_bufp->dfunc.name;
/* Special hack to get around HP compilers' insistence on
* reporting "main" as "_MAIN_" for C/C++ */
- if ((strcmp (SYMBOL_NAME (sym), "_MAIN_") == 0) &&
+ if ((strcmp (DEPRECATED_SYMBOL_NAME (sym), "_MAIN_") == 0) &&
(strcmp (VT (objfile) + dn_bufp->dfunc.name, "main") == 0))
- SYMBOL_NAME (sym) = VT (objfile) + dn_bufp->dfunc.name;
+ DEPRECATED_SYMBOL_NAME (sym) = VT (objfile) + dn_bufp->dfunc.name;
/* The SYMBOL_CPLUS_DEMANGLED_NAME field is expected to
* be the demangled name.
* working around the issue in stack.c. - RT
*/
SYMBOL_INIT_DEMANGLED_NAME (sym, &objfile->symbol_obstack);
- if ((SYMBOL_NAME (sym) == VT (objfile) + dn_bufp->dfunc.alias) &&
+ if ((DEPRECATED_SYMBOL_NAME (sym) == VT (objfile) + dn_bufp->dfunc.alias) &&
(!SYMBOL_CPLUS_DEMANGLED_NAME (sym)))
{
SYMBOL_CLASS (sym) = LOC_BLOCK;
SYMBOL_TYPE (sym) = hpread_read_doc_function_type (hp_type, dn_bufp, objfile, 1);
- /* The "SYMBOL_NAME" field is expected to be the mangled name
+ /* The "DEPRECATED_SYMBOL_NAME" field is expected to be the mangled name
* (if any), which we get from the "alias" field of the SOM record
* if that exists.
*/
if ((dn_bufp->ddocfunc.language == HP_LANGUAGE_CPLUSPLUS) &&
dn_bufp->ddocfunc.alias && /* has an alias */
*(char *) (VT (objfile) + dn_bufp->ddocfunc.alias)) /* not a null string */
- SYMBOL_NAME (sym) = VT (objfile) + dn_bufp->ddocfunc.alias;
+ DEPRECATED_SYMBOL_NAME (sym) = VT (objfile) + dn_bufp->ddocfunc.alias;
else
- SYMBOL_NAME (sym) = VT (objfile) + dn_bufp->ddocfunc.name;
+ DEPRECATED_SYMBOL_NAME (sym) = VT (objfile) + dn_bufp->ddocfunc.name;
/* Special hack to get around HP compilers' insistence on
* reporting "main" as "_MAIN_" for C/C++ */
- if ((strcmp (SYMBOL_NAME (sym), "_MAIN_") == 0) &&
+ if ((strcmp (DEPRECATED_SYMBOL_NAME (sym), "_MAIN_") == 0) &&
(strcmp (VT (objfile) + dn_bufp->ddocfunc.name, "main") == 0))
- SYMBOL_NAME (sym) = VT (objfile) + dn_bufp->ddocfunc.name;
+ DEPRECATED_SYMBOL_NAME (sym) = VT (objfile) + dn_bufp->ddocfunc.name;
if (dn_bufp->ddocfunc.language == HP_LANGUAGE_CPLUSPLUS)
{
*/
SYMBOL_INIT_DEMANGLED_NAME (sym, &objfile->symbol_obstack);
- if ((SYMBOL_NAME (sym) == VT (objfile) + dn_bufp->ddocfunc.alias) &&
+ if ((DEPRECATED_SYMBOL_NAME (sym) == VT (objfile) + dn_bufp->ddocfunc.alias) &&
(!SYMBOL_CPLUS_DEMANGLED_NAME (sym)))
{
* in the symbol table contains a pointer to the real "g".
* We use the storage class LOC_INDIRECT to indicate this. RT
*/
- if (is_in_import_list (SYMBOL_NAME (sym), objfile))
+ if (is_in_import_list (DEPRECATED_SYMBOL_NAME (sym), objfile))
SYMBOL_CLASS (sym) = LOC_INDIRECT;
SYMBOL_VALUE_ADDRESS (sym) = dn_bufp->dsvar.location + data_offset;
* record that actually defines the type.
*/
SYMBOL_TYPE (sym) = hpread_type_lookup (dn_bufp->dtype.type, objfile);
- TYPE_NAME (sym->type) = SYMBOL_NAME (sym);
- TYPE_TAG_NAME (sym->type) = SYMBOL_NAME (sym);
+ TYPE_NAME (sym->type) = DEPRECATED_SYMBOL_NAME (sym);
+ TYPE_TAG_NAME (sym->type) = DEPRECATED_SYMBOL_NAME (sym);
if (dn_bufp->dtag.global)
add_symbol_to_list (sym, &global_symbols);
else if (WITHIN_FUNCTION (objfile))
newsym = (struct symbol *) obstack_alloc (&objfile->symbol_obstack,
sizeof (struct symbol));
memset (newsym, 0, sizeof (struct symbol));
- SYMBOL_NAME (newsym) = name;
+ DEPRECATED_SYMBOL_NAME (newsym) = name;
SYMBOL_LANGUAGE (newsym) = language_auto;
SYMBOL_NAMESPACE (newsym) = VAR_NAMESPACE;
SYMBOL_LINE (newsym) = 0;
ALL_OBJFILE_MSYMBOLS (objfile, msym)
{
- if (SYMBOL_NAME (msym)
- && STREQ (SYMBOL_NAME (msym), name))
+ if (DEPRECATED_SYMBOL_NAME (msym)
+ && STREQ (DEPRECATED_SYMBOL_NAME (msym), name))
{
*objfile_p = objfile;
return msym;
unsigned long indirect = read_memory_unsigned_integer (pc + 2, 4);
struct minimal_symbol *indsym =
indirect ? lookup_minimal_symbol_by_pc (indirect) : 0;
- char *symname = indsym ? SYMBOL_NAME (indsym) : 0;
+ char *symname = indsym ? DEPRECATED_SYMBOL_NAME (indsym) : 0;
if (symname)
{
/* Java language support routines for GDB, the GNU debugger.
- Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
This file is part of GDB.
obstack_alloc (&dynamics_objfile->symbol_obstack, sizeof (struct symbol));
memset (sym, 0, sizeof (struct symbol));
SYMBOL_LANGUAGE (sym) = language_java;
- SYMBOL_NAME (sym) = TYPE_TAG_NAME (type);
+ DEPRECATED_SYMBOL_NAME (sym) = TYPE_TAG_NAME (type);
SYMBOL_CLASS (sym) = LOC_TYPEDEF;
/* SYMBOL_VALUE (sym) = valu; */
SYMBOL_TYPE (sym) = type;
{
if (canonical_arr[i] == NULL)
{
- symname = SYMBOL_NAME (sym_arr[i]);
+ symname = DEPRECATED_SYMBOL_NAME (sym_arr[i]);
canonical_arr[i] = savestring (symname, strlen (symname));
}
}
{
if (canonical_arr)
{
- symname = SYMBOL_NAME (sym_arr[num]);
+ symname = DEPRECATED_SYMBOL_NAME (sym_arr[num]);
make_cleanup (xfree, symname);
canonical_arr[i] = savestring (symname, strlen (symname));
}
/* It is a FORTRAN common block. At least for SGI Fortran the
address is not in the symbol; we need to fix it later in
scan_file_globals. */
- int bucket = hashname (SYMBOL_NAME (s));
+ int bucket = hashname (DEPRECATED_SYMBOL_NAME (s));
SYMBOL_VALUE_CHAIN (s) = global_sym_chain[bucket];
global_sym_chain[bucket] = s;
}
obstack_alloc (¤t_objfile->symbol_obstack,
sizeof (struct symbol)));
memset (enum_sym, 0, sizeof (struct symbol));
- SYMBOL_NAME (enum_sym) =
+ DEPRECATED_SYMBOL_NAME (enum_sym) =
obsavestring (f->name, strlen (f->name),
¤t_objfile->symbol_obstack);
SYMBOL_CLASS (enum_sym) = LOC_CONST;
for anything except pointers or functions. */
}
else
- TYPE_NAME (SYMBOL_TYPE (s)) = SYMBOL_NAME (s);
+ TYPE_NAME (SYMBOL_TYPE (s)) = DEPRECATED_SYMBOL_NAME (s);
}
break;
inc = name[0];
ALL_BLOCK_SYMBOLS (block, i, sym)
{
- if (SYMBOL_NAME (sym)[0] == inc
+ if (DEPRECATED_SYMBOL_NAME (sym)[0] == inc
&& SYMBOL_NAMESPACE (sym) == namespace
&& SYMBOL_CLASS (sym) == class
- && strcmp (SYMBOL_NAME (sym), name) == 0)
+ && strcmp (DEPRECATED_SYMBOL_NAME (sym), name) == 0)
return sym;
}
nsyms >= top_stack->maxsyms)
{
complaint (&symfile_complaints, "block containing %s overfilled",
- SYMBOL_NAME (s));
+ DEPRECATED_SYMBOL_NAME (s));
/* In this case shrink_block is actually grow_block, since
BLOCK_NSYMS(b) is larger than its current size. */
origb = b;
+2003-02-25 David Carlton <carlton@math.stanford.edu>
+
+ * mi-cmd-stack.c: Replace all instances of SYMBOL_NAME with
+ DEPRECATED_SYMBOL_NAME. Update copyright.
+
2003-02-21 Daniel Jacobowitz <drow@mvista.com>
* mi-cmd-stack.c (list_args_or_locals): Handle LOC_COMPUTED and
/* MI Command Set - stack commands.
- Copyright 2000, 2002 Free Software Foundation, Inc.
+ Copyright 2000, 2002, 2003 Free Software Foundation, Inc.
Contributed by Cygnus Solutions (a Red Hat company).
This file is part of GDB.
if (values)
cleanup_tuple =
make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
- ui_out_field_string (uiout, "name", SYMBOL_NAME (sym));
+ ui_out_field_string (uiout, "name", DEPRECATED_SYMBOL_NAME (sym));
if (values)
{
struct symbol *sym2;
if (!locals)
- sym2 = lookup_symbol (SYMBOL_NAME (sym),
+ sym2 = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym),
block, VAR_NAMESPACE,
(int *) NULL,
(struct symtab **) NULL);
{
if (sym->hash_next == NULL)
{
- unsigned int hash = msymbol_hash (SYMBOL_NAME (sym)) % MINIMAL_SYMBOL_HASH_SIZE;
+ unsigned int hash = msymbol_hash (DEPRECATED_SYMBOL_NAME (sym)) % MINIMAL_SYMBOL_HASH_SIZE;
sym->hash_next = table[hash];
table[hash] = sym;
}
else
/* addrs are equal: sort by name */
{
- char *name1 = SYMBOL_NAME (fn1);
- char *name2 = SYMBOL_NAME (fn2);
+ char *name1 = DEPRECATED_SYMBOL_NAME (fn1);
+ char *name2 = DEPRECATED_SYMBOL_NAME (fn2);
if (name1 && name2) /* both have names */
return strcmp (name1, name2);
{
if (SYMBOL_VALUE_ADDRESS (copyfrom) ==
SYMBOL_VALUE_ADDRESS ((copyfrom + 1)) &&
- (STREQ (SYMBOL_NAME (copyfrom), SYMBOL_NAME ((copyfrom + 1)))))
+ (STREQ (DEPRECATED_SYMBOL_NAME (copyfrom), DEPRECATED_SYMBOL_NAME ((copyfrom + 1)))))
{
if (MSYMBOL_TYPE ((copyfrom + 1)) == mst_unknown)
{
for (bindex = 0; bindex < msym_bunch_index; bindex++, mcount++)
{
msymbols[mcount] = bunch->contents[bindex];
- if (SYMBOL_NAME (&msymbols[mcount])[0] == leading_char)
+ if (DEPRECATED_SYMBOL_NAME (&msymbols[mcount])[0] == leading_char)
{
- SYMBOL_NAME (&msymbols[mcount])++;
+ DEPRECATED_SYMBOL_NAME (&msymbols[mcount])++;
}
}
msym_bunch_index = BUNCH_SIZE;
symbol count does *not* include this null symbol, which is why it
is indexed by mcount and not mcount-1. */
- SYMBOL_NAME (&msymbols[mcount]) = NULL;
+ DEPRECATED_SYMBOL_NAME (&msymbols[mcount]) = NULL;
SYMBOL_VALUE_ADDRESS (&msymbols[mcount]) = 0;
MSYMBOL_INFO (&msymbols[mcount]) = NULL;
MSYMBOL_TYPE (&msymbols[mcount]) = mst_unknown;
for (i = 0; i < mcount; i++)
{
- const char *name = SYMBOL_NAME (&objfile->msymbols[i]);
+ const char *name = DEPRECATED_SYMBOL_NAME (&objfile->msymbols[i]);
if (name[0] == '_' && name[1] == 'Z')
{
switch_to_cp_abi ("gnu-v3");
ALL_MSYMBOLS (objfile, msymbol)
{
if (MSYMBOL_TYPE (msymbol) == mst_text
- && STREQ (SYMBOL_NAME (msymbol), SYMBOL_NAME (tsymbol)))
+ && STREQ (DEPRECATED_SYMBOL_NAME (msymbol), DEPRECATED_SYMBOL_NAME (tsymbol)))
return SYMBOL_VALUE_ADDRESS (msymbol);
}
}
/* Read a symbol table in MIPS' format (Third-Eye).
Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
- 1998, 1999, 2000, 2001
+ 1998, 1999, 2000, 2001, 2003
Free Software Foundation, Inc.
Contributed by Alessandro Forin (af@cs.cmu.edu) at CMU. Major work
by Per Bothner, John Gilmore and Ian Lance Taylor at Cygnus Support.
struct minimal_symbol *m;
m = lookup_minimal_symbol_by_pc (objfile->ei.entry_point);
- if (m && SYMBOL_NAME (m + 1))
+ if (m && DEPRECATED_SYMBOL_NAME (m + 1))
{
objfile->ei.entry_file_lowpc = SYMBOL_VALUE_ADDRESS (m);
objfile->ei.entry_file_highpc = SYMBOL_VALUE_ADDRESS (m + 1);
QUIT;
name = SYMBOL_DEMANGLED_NAME (msymbol);
if (name == NULL)
- name = SYMBOL_NAME (msymbol);
+ name = DEPRECATED_SYMBOL_NAME (msymbol);
if (name &&
(name[0] == '-' || name[0] == '+') &&
name[1] == '[') /* Got a method name. */
QUIT;
name = SYMBOL_DEMANGLED_NAME (msymbol);
if (name == NULL)
- name = SYMBOL_NAME (msymbol);
+ name = DEPRECATED_SYMBOL_NAME (msymbol);
if (name &&
(name[0] == '-' || name[0] == '+') &&
name[1] == '[') /* Got a method name. */
QUIT;
name = SYMBOL_DEMANGLED_NAME (sym_arr[ix]);
if (name == NULL)
- name = SYMBOL_NAME (sym_arr[ix]);
+ name = DEPRECATED_SYMBOL_NAME (sym_arr[ix]);
name = strchr (name, ' ') + 1;
if (p[0] && specialcmp(name, p) == 0)
continue; /* Seen this one already (not unique). */
QUIT;
name = SYMBOL_DEMANGLED_NAME (msymbol);
if (name == NULL)
- name = SYMBOL_NAME (msymbol);
+ name = DEPRECATED_SYMBOL_NAME (msymbol);
if (name &&
(name[0] == '-' || name[0] == '+') &&
name[1] == '[') /* Got a method name. */
QUIT;
name = SYMBOL_DEMANGLED_NAME (msymbol);
if (name == NULL)
- name = SYMBOL_NAME (msymbol);
+ name = DEPRECATED_SYMBOL_NAME (msymbol);
if (name &&
(name[0] == '-' || name[0] == '+') &&
name[1] == '[') /* Got a method name. */
QUIT;
name = SYMBOL_DEMANGLED_NAME (sym_arr[ix]);
if (name == NULL)
- name = SYMBOL_NAME (sym_arr[ix]);
+ name = DEPRECATED_SYMBOL_NAME (sym_arr[ix]);
name += 2;
if (p[0] && specialcmp(name, p) == 0)
continue; /* Seen this one already (not unique). */
symname = SYMBOL_DEMANGLED_NAME (msymbol);
if (symname == NULL)
- symname = SYMBOL_NAME (msymbol);
+ symname = DEPRECATED_SYMBOL_NAME (msymbol);
if (symname == NULL)
continue;
const char *newsymname = SYMBOL_DEMANGLED_NAME (sym);
if (newsymname == NULL)
- newsymname = SYMBOL_NAME (sym);
+ newsymname = DEPRECATED_SYMBOL_NAME (sym);
if (strcmp (symname, newsymname) == 0)
{
/* Found a high-level method sym: swap it into the
= &objfile->msymbols[objfile->minimal_symbol_count];
memset (m, 0, sizeof (*m));
- SYMBOL_NAME (m) = NULL;
+ DEPRECATED_SYMBOL_NAME (m) = NULL;
SYMBOL_VALUE_ADDRESS (m) = 0;
MSYMBOL_INFO (m) = NULL;
MSYMBOL_TYPE (m) = mst_unknown;
else if (SYMBOL_CLASS (sym) == LOC_CONST
&& SYMBOL_NAMESPACE (sym) == LABEL_NAMESPACE
- && strcmp (SYMBOL_NAME (sym), MIPS_EFI_SYMBOL_NAME) == 0)
+ && strcmp (DEPRECATED_SYMBOL_NAME (sym), MIPS_EFI_SYMBOL_NAME) == 0)
ecoff_relocate_efi (sym, ANOFFSET (delta,
s->block_line_section));
#endif
/* Traverse all minimal symbols in one objfile. */
#define ALL_OBJFILE_MSYMBOLS(objfile, m) \
- for ((m) = (objfile) -> msymbols; SYMBOL_NAME(m) != NULL; (m)++)
+ for ((m) = (objfile) -> msymbols; DEPRECATED_SYMBOL_NAME(m) != NULL; (m)++)
/* Traverse all symtabs in all objfiles. */
int is_this_fld;
if (msymbol != NULL)
- wsym = lookup_symbol (SYMBOL_NAME (msymbol), block,
+ wsym = lookup_symbol (DEPRECATED_SYMBOL_NAME (msymbol), block,
VAR_NAMESPACE, &is_this_fld, &s);
if (wsym)
check_stub_method_group (domain, i);
for (j = 0; j < len2; j++)
{
- if (STREQ (SYMBOL_NAME (sym), TYPE_FN_FIELD_PHYSNAME (f, j)))
+ if (STREQ (DEPRECATED_SYMBOL_NAME (sym), TYPE_FN_FIELD_PHYSNAME (f, j)))
goto common;
}
}
if (do_demangle || asm_demangle)
name_temp = SYMBOL_PRINT_NAME (symbol);
else
- name_temp = SYMBOL_NAME (symbol);
+ name_temp = DEPRECATED_SYMBOL_NAME (symbol);
}
if (msymbol != NULL)
if (do_demangle || asm_demangle)
name_temp = SYMBOL_PRINT_NAME (msymbol);
else
- name_temp = SYMBOL_NAME (msymbol);
+ name_temp = DEPRECATED_SYMBOL_NAME (msymbol);
}
}
if (symbol == NULL && msymbol == NULL)
}
printf_filtered ("Symbol \"");
- fprintf_symbol_filtered (gdb_stdout, SYMBOL_NAME (sym),
+ fprintf_symbol_filtered (gdb_stdout, DEPRECATED_SYMBOL_NAME (sym),
current_language->la_language, DMGL_ANSI);
printf_filtered ("\" is ");
val = SYMBOL_VALUE (sym);
{
struct minimal_symbol *msym;
- msym = lookup_minimal_symbol (SYMBOL_NAME (sym), NULL, NULL);
+ msym = lookup_minimal_symbol (DEPRECATED_SYMBOL_NAME (sym), NULL, NULL);
if (msym == NULL)
printf_filtered ("unresolved");
else
Null parameter names occur on the RS/6000, for traceback tables.
FIXME, should we even print them? */
- if (*SYMBOL_NAME (sym))
+ if (*DEPRECATED_SYMBOL_NAME (sym))
{
struct symbol *nsym;
nsym = lookup_symbol
- (SYMBOL_NAME (sym),
+ (DEPRECATED_SYMBOL_NAME (sym),
b, VAR_NAMESPACE, (int *) NULL, (struct symtab **) NULL);
if (SYMBOL_CLASS (nsym) == LOC_REGISTER)
{
/* Check for bigtoc fixup code. */
msymbol = lookup_minimal_symbol_by_pc (pc);
- if (msymbol && rs6000_in_solib_return_trampoline (pc, SYMBOL_NAME (msymbol)))
+ if (msymbol && rs6000_in_solib_return_trampoline (pc, DEPRECATED_SYMBOL_NAME (msymbol)))
{
/* Double-check that the third instruction from PC is relative "b". */
op = read_memory_integer (pc + 8, 4);
/* Low level interface for debugging Solaris threads for GDB, the GNU debugger.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GDB.
struct minimal_symbol *msym;
msym = lookup_minimal_symbol_by_pc (ti.ti_startfunc);
if (msym)
- printf_filtered (" startfunc: %s\n", SYMBOL_NAME (msym));
+ printf_filtered (" startfunc: %s\n", DEPRECATED_SYMBOL_NAME (msym));
else
printf_filtered (" startfunc: 0x%s\n", paddr (ti.ti_startfunc));
}
struct minimal_symbol *msym;
msym = lookup_minimal_symbol_by_pc (ti.ti_pc);
if (msym)
- printf_filtered (" - Sleep func: %s\n", SYMBOL_NAME (msym));
+ printf_filtered (" - Sleep func: %s\n", DEPRECATED_SYMBOL_NAME (msym));
else
printf_filtered (" - Sleep func: 0x%s\n", paddr (ti.ti_startfunc));
}
struct minimal_symbol *msymbol2;
/* What a crock. */
- msymbol2 = lookup_minimal_symbol_solib_trampoline (SYMBOL_NAME (msymbol),
+ msymbol2 = lookup_minimal_symbol_solib_trampoline (DEPRECATED_SYMBOL_NAME (msymbol),
NULL, objfile);
/* Found a symbol with the right name. */
if (msymbol2)
memset (sym, 0, sizeof (struct symbol));
SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
SYMBOL_CLASS (sym) = LOC_OPTIMIZED_OUT;
- SYMBOL_NAME (sym) =
+ DEPRECATED_SYMBOL_NAME (sym) =
obsavestring (name, pp - name, &objfile->symbol_obstack);
pp += 2;
if (*(pp - 1) == 'F' || *(pp - 1) == 'f')
// OBSOLETE /* Get symbol typs name and validate
// OBSOLETE eg: p = "A;;__ct__1AFv foo__1AFv ;;;" */
// OBSOLETE sname = get_substring (&p, ';');
-// OBSOLETE if (!sname || strcmp (sname, SYMBOL_NAME (sym)))
+// OBSOLETE if (!sname || strcmp (sname, DEPRECATED_SYMBOL_NAME (sym)))
// OBSOLETE error ("Internal error: base symbol type name does not match\n");
// 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 (SYMBOL_NAME (sym), 0, STRUCT_NAMESPACE, 0, 0);
+// OBSOLETE ref_sym = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym), 0, STRUCT_NAMESPACE, 0, 0);
// OBSOLETE type = SYMBOL_TYPE (ref_sym);
will correctly print the name.
Don't add_symbol_to_list so that lookup_symbol won't find it.
nope... needed for fixups. */
- SYMBOL_NAME (sym) = SYMBOL_NAME (ref_sym);
+ DEPRECATED_SYMBOL_NAME (sym) = DEPRECATED_SYMBOL_NAME (ref_sym);
/* Done! */
return 1;
switch (string[1])
{
case 't':
- SYMBOL_NAME (sym) = obsavestring ("this", strlen ("this"),
+ DEPRECATED_SYMBOL_NAME (sym) = obsavestring ("this", strlen ("this"),
&objfile->symbol_obstack);
break;
case 'v': /* $vtbl_ptr_type */
- /* Was: SYMBOL_NAME (sym) = "vptr"; */
+ /* Was: DEPRECATED_SYMBOL_NAME (sym) = "vptr"; */
goto normal;
case 'e':
- SYMBOL_NAME (sym) = obsavestring ("eh_throw", strlen ("eh_throw"),
+ DEPRECATED_SYMBOL_NAME (sym) = obsavestring ("eh_throw", strlen ("eh_throw"),
&objfile->symbol_obstack);
break;
return NULL;
/* S..P contains the name of the symbol. We need to store
- the correct name into SYMBOL_NAME. */
+ the correct name into DEPRECATED_SYMBOL_NAME. */
nlen = p - s;
if (refnum >= 0)
{
if (nlen > 0)
SYMBOL_SET_NAMES (sym, s, nlen, objfile);
else
- /* FIXME! Want SYMBOL_NAME (sym) = 0;
+ /* FIXME! Want DEPRECATED_SYMBOL_NAME (sym) = 0;
Get error if leave name 0. So give it something. */
{
nlen = p - string;
Symbol references don't have valid names and wont't match up with
minimal symbols when the global_sym_chain is relocated.
We'll fixup symbol references when we fixup the defining symbol. */
- if (SYMBOL_NAME (sym) && SYMBOL_NAME (sym)[0] != '#')
+ if (DEPRECATED_SYMBOL_NAME (sym) && DEPRECATED_SYMBOL_NAME (sym)[0] != '#')
{
- i = hashname (SYMBOL_NAME (sym));
+ i = hashname (DEPRECATED_SYMBOL_NAME (sym));
SYMBOL_VALUE_CHAIN (sym) = global_sym_chain[i];
global_sym_chain[i] = sym;
}
prev_sym = local_symbols->symbol[local_symbols->nsyms - 1];
if ((SYMBOL_CLASS (prev_sym) == LOC_REF_ARG
|| SYMBOL_CLASS (prev_sym) == LOC_ARG)
- && STREQ (SYMBOL_NAME (prev_sym), SYMBOL_NAME (sym)))
+ && STREQ (DEPRECATED_SYMBOL_NAME (prev_sym), DEPRECATED_SYMBOL_NAME (sym)))
{
SYMBOL_CLASS (prev_sym) = LOC_REGPARM;
/* Use the type from the LOC_REGISTER; that is the type
SYMBOL_CLASS (sym) = LOC_STATIC;
SYMBOL_VALUE_ADDRESS (sym) = valu;
#ifdef STATIC_TRANSFORM_NAME
- if (IS_STATIC_TRANSFORM_NAME (SYMBOL_NAME (sym)))
+ if (IS_STATIC_TRANSFORM_NAME (DEPRECATED_SYMBOL_NAME (sym)))
{
struct minimal_symbol *msym;
- msym = lookup_minimal_symbol (SYMBOL_NAME (sym), NULL, objfile);
+ msym = lookup_minimal_symbol (DEPRECATED_SYMBOL_NAME (sym), NULL, objfile);
if (msym != NULL)
{
- SYMBOL_NAME (sym) = STATIC_TRANSFORM_NAME (SYMBOL_NAME (sym));
+ DEPRECATED_SYMBOL_NAME (sym) = STATIC_TRANSFORM_NAME (DEPRECATED_SYMBOL_NAME (sym));
SYMBOL_VALUE_ADDRESS (sym) = SYMBOL_VALUE_ADDRESS (msym);
}
}
extern const char vtbl_ptr_name[];
if ((TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_PTR
- && strcmp (SYMBOL_NAME (sym), vtbl_ptr_name))
+ && strcmp (DEPRECATED_SYMBOL_NAME (sym), vtbl_ptr_name))
|| TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_FUNC)
{
/* If we are giving a name to a type such as "pointer to
/* Pascal accepts names for pointer types. */
if (current_subfile->language == language_pascal)
{
- TYPE_NAME (SYMBOL_TYPE (sym)) = SYMBOL_NAME (sym);
+ TYPE_NAME (SYMBOL_TYPE (sym)) = DEPRECATED_SYMBOL_NAME (sym);
}
}
else
- TYPE_NAME (SYMBOL_TYPE (sym)) = SYMBOL_NAME (sym);
+ TYPE_NAME (SYMBOL_TYPE (sym)) = DEPRECATED_SYMBOL_NAME (sym);
}
add_symbol_to_list (sym, &file_symbols);
SYMBOL_NAMESPACE (sym) = STRUCT_NAMESPACE;
if (TYPE_TAG_NAME (SYMBOL_TYPE (sym)) == 0)
TYPE_TAG_NAME (SYMBOL_TYPE (sym))
- = obconcat (&objfile->type_obstack, "", "", SYMBOL_NAME (sym));
+ = obconcat (&objfile->type_obstack, "", "", DEPRECATED_SYMBOL_NAME (sym));
add_symbol_to_list (sym, &file_symbols);
if (synonym)
SYMBOL_NAMESPACE (typedef_sym) = VAR_NAMESPACE;
if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0)
TYPE_NAME (SYMBOL_TYPE (sym))
- = obconcat (&objfile->type_obstack, "", "", SYMBOL_NAME (sym));
+ = obconcat (&objfile->type_obstack, "", "", DEPRECATED_SYMBOL_NAME (sym));
add_symbol_to_list (typedef_sym, &file_symbols);
}
break;
SYMBOL_CLASS (sym) = LOC_STATIC;
SYMBOL_VALUE_ADDRESS (sym) = valu;
#ifdef STATIC_TRANSFORM_NAME
- if (IS_STATIC_TRANSFORM_NAME (SYMBOL_NAME (sym)))
+ if (IS_STATIC_TRANSFORM_NAME (DEPRECATED_SYMBOL_NAME (sym)))
{
struct minimal_symbol *msym;
- msym = lookup_minimal_symbol (SYMBOL_NAME (sym), NULL, objfile);
+ msym = lookup_minimal_symbol (DEPRECATED_SYMBOL_NAME (sym), NULL, objfile);
if (msym != NULL)
{
- SYMBOL_NAME (sym) = STATIC_TRANSFORM_NAME (SYMBOL_NAME (sym));
+ DEPRECATED_SYMBOL_NAME (sym) = STATIC_TRANSFORM_NAME (DEPRECATED_SYMBOL_NAME (sym));
SYMBOL_VALUE_ADDRESS (sym) = SYMBOL_VALUE_ADDRESS (msym);
}
}
if (SYMBOL_CLASS (sym) == LOC_TYPEDEF
&& SYMBOL_NAMESPACE (sym) == STRUCT_NAMESPACE
&& (TYPE_CODE (SYMBOL_TYPE (sym)) == code)
- && STREQ (SYMBOL_NAME (sym), type_name))
+ && STREQ (DEPRECATED_SYMBOL_NAME (sym), type_name))
{
obstack_free (&objfile->type_obstack, type_name);
type = SYMBOL_TYPE (sym);
sym = (struct symbol *)
obstack_alloc (&objfile->symbol_obstack, sizeof (struct symbol));
memset (sym, 0, sizeof (struct symbol));
- SYMBOL_NAME (sym) = name;
+ DEPRECATED_SYMBOL_NAME (sym) = name;
SYMBOL_LANGUAGE (sym) = current_subfile->language;
SYMBOL_CLASS (sym) = LOC_CONST;
SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
{
struct symbol *xsym = syms->symbol[j];
SYMBOL_TYPE (xsym) = type;
- TYPE_FIELD_NAME (type, n) = SYMBOL_NAME (xsym);
+ TYPE_FIELD_NAME (type, n) = DEPRECATED_SYMBOL_NAME (xsym);
TYPE_FIELD_BITPOS (type, n) = SYMBOL_VALUE (xsym);
TYPE_FIELD_BITSIZE (type, n) = 0;
}
obstack_alloc (&objfile->symbol_obstack, sizeof (struct symbol));
memset (sym, 0, sizeof (struct symbol));
/* Note: common_block_name already saved on symbol_obstack */
- SYMBOL_NAME (sym) = common_block_name;
+ DEPRECATED_SYMBOL_NAME (sym) = common_block_name;
SYMBOL_CLASS (sym) = LOC_BLOCK;
/* Now we copy all the symbols which have been defined since the BCOMM. */
/* Should we be putting local_symbols back to what it was?
Does it matter? */
- i = hashname (SYMBOL_NAME (sym));
+ i = hashname (DEPRECATED_SYMBOL_NAME (sym));
SYMBOL_VALUE_CHAIN (sym) = global_sym_chain[i];
global_sym_chain[i] = sym;
common_block_name = NULL;
&& SYMBOL_NAMESPACE (sym) == STRUCT_NAMESPACE
&& (TYPE_CODE (SYMBOL_TYPE (sym)) ==
TYPE_CODE (*type))
- && STREQ (SYMBOL_NAME (sym), typename))
+ && STREQ (DEPRECATED_SYMBOL_NAME (sym), typename))
replace_type (*type, SYMBOL_TYPE (sym));
}
}
return;
for (msymbol = resolve_objfile->msymbols;
- msymbol && SYMBOL_NAME (msymbol) != NULL;
+ msymbol && DEPRECATED_SYMBOL_NAME (msymbol) != NULL;
msymbol++)
{
QUIT;
/* Get the hash index and check all the symbols
under that hash index. */
- hash = hashname (SYMBOL_NAME (msymbol));
+ hash = hashname (DEPRECATED_SYMBOL_NAME (msymbol));
for (sym = global_sym_chain[hash]; sym;)
{
- if (SYMBOL_NAME (msymbol)[0] == SYMBOL_NAME (sym)[0] &&
- STREQ (SYMBOL_NAME (msymbol) + 1, SYMBOL_NAME (sym) + 1))
+ if (DEPRECATED_SYMBOL_NAME (msymbol)[0] == DEPRECATED_SYMBOL_NAME (sym)[0] &&
+ STREQ (DEPRECATED_SYMBOL_NAME (msymbol) + 1, DEPRECATED_SYMBOL_NAME (sym) + 1))
{
struct alias_list *aliases;
else
complaint (&symfile_complaints,
"%s: common block `%s' from global_sym_chain unresolved",
- objfile->name, SYMBOL_NAME (prev));
+ objfile->name, DEPRECATED_SYMBOL_NAME (prev));
}
}
memset (global_sym_chain, 0, sizeof (global_sym_chain));
/* We also don't know anything about the function besides
its address and name. */
func = 0;
- funname = SYMBOL_NAME (msymbol);
+ funname = DEPRECATED_SYMBOL_NAME (msymbol);
funlang = SYMBOL_LANGUAGE (msymbol);
}
else
here, while we still have our hands on the function
symbol.) */
char *demangled;
- funname = SYMBOL_NAME (func);
+ funname = DEPRECATED_SYMBOL_NAME (func);
funlang = SYMBOL_LANGUAGE (func);
if (funlang == language_cplus)
{
struct minimal_symbol *msymbol = lookup_minimal_symbol_by_pc (frame_address_in_block (fi));
if (msymbol != NULL)
{
- funname = SYMBOL_NAME (msymbol);
+ funname = DEPRECATED_SYMBOL_NAME (msymbol);
funlang = SYMBOL_LANGUAGE (msymbol);
}
}
* have our hands on the function symbol.)
*/
char *demangled;
- funname = SYMBOL_NAME (func);
+ funname = DEPRECATED_SYMBOL_NAME (func);
funlang = SYMBOL_LANGUAGE (func);
if (funlang == language_cplus)
{
register struct minimal_symbol *msymbol = lookup_minimal_symbol_by_pc (get_frame_pc (fi));
if (msymbol != NULL)
{
- funname = SYMBOL_NAME (msymbol);
+ funname = DEPRECATED_SYMBOL_NAME (msymbol);
funlang = SYMBOL_LANGUAGE (msymbol);
}
}
ALL_BLOCK_SYMBOLS (b, i, sym)
{
- if (STREQ (SYMBOL_NAME (sym), "default"))
+ if (STREQ (DEPRECATED_SYMBOL_NAME (sym), "default"))
{
if (*have_default)
continue;
float). There are also LOC_ARG/LOC_REGISTER pairs which
are not combined in symbol-reading. */
- sym2 = lookup_symbol (SYMBOL_NAME (sym),
+ sym2 = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym),
b, VAR_NAMESPACE, (int *) NULL, (struct symtab **) NULL);
print_variable_value (sym2, fi, stream);
fprintf_filtered (stream, "\n");
memcpy (buf, name, namelength);
buf[namelength] = '\0';
- SYMBOL_NAME (&psymbol) = bcache (buf, namelength + 1, objfile->psymbol_cache);
+ DEPRECATED_SYMBOL_NAME (&psymbol) = bcache (buf, namelength + 1, objfile->psymbol_cache);
buf = alloca (dem_namelength + 1);
memcpy (buf, dem_name, dem_namelength);
for (sym = BLOCK_BUCKET (b, i); sym; sym = next_sym)
{
next_sym = sym->hash_next;
- xmfree (objfile->md, SYMBOL_NAME (sym));
+ xmfree (objfile->md, DEPRECATED_SYMBOL_NAME (sym));
xmfree (objfile->md, sym);
}
}
return;
}
for (index = 0, msymbol = objfile->msymbols;
- SYMBOL_NAME (msymbol) != NULL; msymbol++, index++)
+ DEPRECATED_SYMBOL_NAME (msymbol) != NULL; msymbol++, index++)
{
switch (msymbol->type)
{
}
fprintf_filtered (outfile, "[%2d] %c ", index, ms_type);
print_address_numeric (SYMBOL_VALUE_ADDRESS (msymbol), 1, outfile);
- fprintf_filtered (outfile, " %s", SYMBOL_NAME (msymbol));
+ fprintf_filtered (outfile, " %s", DEPRECATED_SYMBOL_NAME (msymbol));
if (SYMBOL_BFD_SECTION (msymbol))
fprintf_filtered (outfile, " section %s",
bfd_section_name (objfile->obfd,
print_address_numeric (BLOCK_END (b), 1, outfile);
if (BLOCK_FUNCTION (b))
{
- fprintf_filtered (outfile, ", function %s", SYMBOL_NAME (BLOCK_FUNCTION (b)));
+ fprintf_filtered (outfile, ", function %s", DEPRECATED_SYMBOL_NAME (BLOCK_FUNCTION (b)));
if (SYMBOL_DEMANGLED_NAME (BLOCK_FUNCTION (b)) != NULL)
{
fprintf_filtered (outfile, ", %s",
? "enum"
: (TYPE_CODE (SYMBOL_TYPE (symbol)) == TYPE_CODE_STRUCT
? "struct" : "union")),
- SYMBOL_NAME (symbol));
+ DEPRECATED_SYMBOL_NAME (symbol));
LA_PRINT_TYPE (SYMBOL_TYPE (symbol), "", outfile, 1, depth);
}
fprintf_filtered (outfile, ";\n");
fprintf_filtered (outfile, " %s partial symbols:\n", what);
while (count-- > 0)
{
- fprintf_filtered (outfile, " `%s'", SYMBOL_NAME (*p));
+ fprintf_filtered (outfile, " `%s'", DEPRECATED_SYMBOL_NAME (*p));
if (SYMBOL_DEMANGLED_NAME (*p) != NULL)
{
fprintf_filtered (outfile, " `%s'", SYMBOL_DEMANGLED_NAME (*p));
length = ps->n_static_syms;
while (length--)
{
- sym = lookup_block_symbol (b, SYMBOL_NAME (*psym),
+ sym = lookup_block_symbol (b, DEPRECATED_SYMBOL_NAME (*psym),
NULL, SYMBOL_NAMESPACE (*psym));
if (!sym)
{
printf_filtered ("Static symbol `");
- puts_filtered (SYMBOL_NAME (*psym));
+ puts_filtered (DEPRECATED_SYMBOL_NAME (*psym));
printf_filtered ("' only found in ");
puts_filtered (ps->filename);
printf_filtered (" psymtab\n");
length = ps->n_global_syms;
while (length--)
{
- sym = lookup_block_symbol (b, SYMBOL_NAME (*psym),
+ sym = lookup_block_symbol (b, DEPRECATED_SYMBOL_NAME (*psym),
NULL, SYMBOL_NAMESPACE (*psym));
if (!sym)
{
printf_filtered ("Global symbol `");
- puts_filtered (SYMBOL_NAME (*psym));
+ puts_filtered (DEPRECATED_SYMBOL_NAME (*psym));
printf_filtered ("' only found in ");
puts_filtered (ps->filename);
printf_filtered (" psymtab\n");
}
}
+/* Return the source code name of a symbol. In languages where
+ demangling is necessary, this is the demangled name. */
+
+char *
+symbol_natural_name (const struct general_symbol_info *gsymbol)
+{
+ if ((gsymbol->language == language_cplus
+ || gsymbol->language == language_java
+ || gsymbol->language == language_objc)
+ && (gsymbol->language_specific.cplus_specific.demangled_name != NULL))
+ {
+ return gsymbol->language_specific.cplus_specific.demangled_name;
+ }
+ else
+ {
+ return gsymbol->name;
+ }
+}
+
/* Return the demangled name for a symbol based on the language for
that symbol. If no demangled name exists, return NULL. */
char *
bv = BLOCKVECTOR (s);
block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
- /* This call used to pass `SYMBOL_NAME (msymbol)' as the
+ /* This call used to pass `DEPRECATED_SYMBOL_NAME (msymbol)' as the
`name' argument to lookup_block_symbol. But the name
of a minimal symbol is always mangled, so that seems
to be clearly the wrong thing to pass as the
}
else if (MSYMBOL_TYPE (msymbol) != mst_text
&& MSYMBOL_TYPE (msymbol) != mst_file_text
- && !STREQ (name, SYMBOL_NAME (msymbol)))
+ && !STREQ (name, DEPRECATED_SYMBOL_NAME (msymbol)))
{
/* This is a mangled variable, look it up by its
mangled name. */
- return lookup_symbol_aux (SYMBOL_NAME (msymbol), mangled_name,
+ return lookup_symbol_aux (DEPRECATED_SYMBOL_NAME (msymbol), mangled_name,
NULL, namespace, is_a_field_of_this,
symtab);
}
{
if (SYMBOL_NAMESPACE (sym) == namespace
&& (mangled_name
- ? strcmp (SYMBOL_NAME (sym), mangled_name) == 0
+ ? strcmp (DEPRECATED_SYMBOL_NAME (sym), mangled_name) == 0
: SYMBOL_MATCHES_NAME (sym, name)))
return sym;
}
sym = BLOCK_SYM (block, bot);
if (SYMBOL_NAMESPACE (sym) == namespace
&& (mangled_name
- ? strcmp (SYMBOL_NAME (sym), mangled_name) == 0
+ ? strcmp (DEPRECATED_SYMBOL_NAME (sym), mangled_name) == 0
: SYMBOL_MATCHES_NAME (sym, name)))
{
return sym;
sym = BLOCK_SYM (block, bot);
if (SYMBOL_NAMESPACE (sym) == namespace
&& (mangled_name
- ? strcmp (SYMBOL_NAME (sym), mangled_name) == 0
+ ? strcmp (DEPRECATED_SYMBOL_NAME (sym), mangled_name) == 0
: SYMBOL_MATCHES_NAME (sym, name)))
{
/* If SYM has aliases, then use any alias that is active
if (msymbol != NULL)
if (MSYMBOL_TYPE (msymbol) == mst_solib_trampoline)
{
- mfunsym = lookup_minimal_symbol_text (SYMBOL_NAME (msymbol), NULL, NULL);
+ mfunsym = lookup_minimal_symbol_text (DEPRECATED_SYMBOL_NAME (msymbol), NULL, NULL);
if (mfunsym == NULL)
/* I eliminated this warning since it is coming out
* in the following situation:
* so of course we can't find the real func/line info,
* but the "break" still works, and the warning is annoying.
* So I commented out the warning. RT */
- /* warning ("In stub for %s; unable to find real function/line info", SYMBOL_NAME(msymbol)) */ ;
+ /* warning ("In stub for %s; unable to find real function/line info", DEPRECATED_SYMBOL_NAME (msymbol)) */ ;
/* fall through */
else if (SYMBOL_VALUE (mfunsym) == SYMBOL_VALUE (msymbol))
/* Avoid infinite recursion */
/* See above comment about why warning is commented out */
- /* warning ("In stub for %s; unable to find real function/line info", SYMBOL_NAME(msymbol)) */ ;
+ /* warning ("In stub for %s; unable to find real function/line info", DEPRECATED_SYMBOL_NAME (msymbol)) */ ;
/* fall through */
else
return find_pc_line (SYMBOL_VALUE (mfunsym), 0);
symbol associated to a given minimal symbol (if
any). */
if (kind == FUNCTIONS_NAMESPACE
- || lookup_symbol (SYMBOL_NAME (msymbol),
+ || lookup_symbol (DEPRECATED_SYMBOL_NAME (msymbol),
(struct block *) NULL,
VAR_NAMESPACE,
0, (struct symtab **) NULL) == NULL)
(0 == find_pc_symtab (SYMBOL_VALUE_ADDRESS (msymbol))))
{
/* Variables/Absolutes: Look up by name */
- if (lookup_symbol (SYMBOL_NAME (msymbol),
+ if (lookup_symbol (DEPRECATED_SYMBOL_NAME (msymbol),
(struct block *) NULL, VAR_NAMESPACE,
0, (struct symtab **) NULL) == NULL)
{
if (p->msymbol == NULL)
{
char *string = (char *) alloca (strlen (p->symtab->filename)
- + strlen (SYMBOL_NAME (p->symbol))
+ + strlen (DEPRECATED_SYMBOL_NAME (p->symbol))
+ 4);
strcpy (string, p->symtab->filename);
strcat (string, ":'");
- strcat (string, SYMBOL_NAME (p->symbol));
+ strcat (string, DEPRECATED_SYMBOL_NAME (p->symbol));
strcat (string, "'");
break_command (string, from_tty);
print_symbol_info (FUNCTIONS_NAMESPACE,
}
else
{
- break_command (SYMBOL_NAME (p->msymbol), from_tty);
+ break_command (DEPRECATED_SYMBOL_NAME (p->msymbol), from_tty);
printf_filtered ("<function, no debug info> %s;\n",
SYMBOL_PRINT_NAME (p->msymbol));
}
(SYMBOL_DEMANGLED_NAME (symbol), (sym_text), (len), (text), (word)); \
else \
completion_list_add_name \
- (SYMBOL_NAME (symbol), (sym_text), (len), (text), (word)); \
+ (DEPRECATED_SYMBOL_NAME (symbol), (sym_text), (len), (text), (word)); \
} while (0)
/* Test to see if the symbol specified by SYMNAME (which is already
/* skip any symbols that we've already considered. */
for (i = 0; i < sym_return_val_index; ++i)
- if (!strcmp (SYMBOL_NAME (sym), SYMBOL_NAME (sym_return_val[i])))
+ if (!strcmp (DEPRECATED_SYMBOL_NAME (sym), DEPRECATED_SYMBOL_NAME (sym_return_val[i])))
return;
/* Get the demangled name without parameters */
struct general_symbol_info
{
- /* Name of the symbol. This is a required field. Storage for the name is
- allocated on the psymbol_obstack or symbol_obstack for the associated
- objfile. */
+ /* Name of the symbol. This is a required field. Storage for the
+ name is allocated on the psymbol_obstack or symbol_obstack for
+ the associated objfile. For languages like C++ that make a
+ distinction between the mangled name and demangled name, this is
+ the mangled name. */
char *name;
union
{
- struct cplus_specific /* For C++ */
- /* and Java */
+ struct cplus_specific
{
+ /* This is in fact used for C++, Java, and Objective C. */
char *demangled_name;
}
cplus_specific;
functions, unless the callers are changed to pass in the ginfo
field only, instead of the SYMBOL parameter. */
-#define SYMBOL_NAME(symbol) (symbol)->ginfo.name
+#define DEPRECATED_SYMBOL_NAME(symbol) (symbol)->ginfo.name
#define SYMBOL_VALUE(symbol) (symbol)->ginfo.value.ivalue
#define SYMBOL_VALUE_ADDRESS(symbol) (symbol)->ginfo.value.address
#define SYMBOL_VALUE_BYTES(symbol) (symbol)->ginfo.value.bytes
const char *name, int len,
struct objfile *objfile);
+/* Now come lots of name accessor macros. Short version as to when to
+ use which: Use SYMBOL_NATURAL_NAME to refer to the name of the
+ symbol in the original source code. Use SYMBOL_LINKAGE_NAME if you
+ want to know what the linker thinks the symbol's name is. Use
+ SYMBOL_PRINT_NAME for output. Use SYMBOL_DEMANGLED_NAME if you
+ specifically need to know whether SYMBOL_NATURAL_NAME and
+ SYMBOL_LINKAGE_NAME are different. Don't use
+ DEPRECATED_SYMBOL_NAME at all: instances of that macro should be
+ replaced by SYMBOL_NATURAL_NAME, SYMBOL_LINKAGE_NAME, or perhaps
+ SYMBOL_PRINT_NAME. */
+
+/* Return SYMBOL's "natural" name, i.e. the name that it was called in
+ the original source code. In languages like C++ where symbols may
+ be mangled for ease of manipulation by the linker, this is the
+ demangled name. */
+
+#define SYMBOL_NATURAL_NAME(symbol) \
+ (symbol_natural_name (&(symbol)->ginfo))
+extern char *symbol_natural_name (const struct general_symbol_info *symbol);
+
+/* Return SYMBOL's name from the point of view of the linker. In
+ languages like C++ where symbols may be mangled for ease of
+ manipulation by the linker, this is the mangled name; otherwise,
+ it's the same as SYMBOL_NATURAL_NAME. This is currently identical
+ to DEPRECATED_SYMBOL_NAME, but please use SYMBOL_LINKAGE_NAME when
+ appropriate: it conveys the additional semantic information that
+ you really have thought about the issue and decided that you mean
+ SYMBOL_LINKAGE_NAME instead of SYMBOL_NATURAL_NAME. */
+
+#define SYMBOL_LINKAGE_NAME(symbol) (symbol)->ginfo.name
+
/* Return the demangled name for a symbol based on the language for
that symbol. If no demangled name exists, return NULL. */
#define SYMBOL_DEMANGLED_NAME(symbol) \
output. */
#define SYMBOL_PRINT_NAME(symbol) \
- (demangle && SYMBOL_DEMANGLED_NAME (symbol) != NULL \
- ? SYMBOL_DEMANGLED_NAME (symbol) \
- : SYMBOL_NAME (symbol))
+ (demangle ? SYMBOL_NATURAL_NAME (symbol) : SYMBOL_LINKAGE_NAME (symbol))
/* Macro that tests a symbol for a match against a specified name string.
First test the unencoded name, then looks for and test a C++ encoded
Evaluates to zero if the match fails, or nonzero if it succeeds. */
#define SYMBOL_MATCHES_NAME(symbol, name) \
- (STREQ (SYMBOL_NAME (symbol), (name)) \
+ (STREQ (DEPRECATED_SYMBOL_NAME (symbol), (name)) \
|| (SYMBOL_DEMANGLED_NAME (symbol) != NULL \
&& strcmp_iw (SYMBOL_DEMANGLED_NAME (symbol), (name)) == 0))
Evaluates to zero if the match fails, or nonzero if it succeeds. */
#define SYMBOL_MATCHES_REGEXP(symbol) \
- (re_exec (SYMBOL_NAME (symbol)) != 0 \
+ (re_exec (DEPRECATED_SYMBOL_NAME (symbol)) != 0 \
|| (SYMBOL_DEMANGLED_NAME (symbol) != NULL \
&& re_exec (SYMBOL_DEMANGLED_NAME (symbol)) != 0))
/* save func name as "$trace_func", a debugger variable visible to users */
if (traceframe_fun == NULL ||
- SYMBOL_NAME (traceframe_fun) == NULL)
+ DEPRECATED_SYMBOL_NAME (traceframe_fun) == NULL)
set_internalvar (lookup_internalvar ("trace_func"),
value_from_pointer (charstar, (LONGEST) 0));
else
{
- len = strlen (SYMBOL_NAME (traceframe_fun));
+ len = strlen (DEPRECATED_SYMBOL_NAME (traceframe_fun));
func_range = create_range_type (func_range,
builtin_type_int, 0, len - 1);
func_string = create_array_type (func_string,
func_val = allocate_value (func_string);
VALUE_TYPE (func_val) = func_string;
memcpy (VALUE_CONTENTS_RAW (func_val),
- SYMBOL_NAME (traceframe_fun),
+ DEPRECATED_SYMBOL_NAME (traceframe_fun),
len);
func_val->modifiable = 0;
set_internalvar (lookup_internalvar ("trace_func"), func_val);
if (SYMBOL_CLASS (exp->elts[2].symbol) == LOC_CONST)
{
warning ("constant %s (value %ld) will not be collected.",
- SYMBOL_NAME (exp->elts[2].symbol),
+ DEPRECATED_SYMBOL_NAME (exp->elts[2].symbol),
SYMBOL_VALUE (exp->elts[2].symbol));
return BADLINE;
}
else if (SYMBOL_CLASS (exp->elts[2].symbol) == LOC_OPTIMIZED_OUT)
{
warning ("%s is optimized away and cannot be collected.",
- SYMBOL_NAME (exp->elts[2].symbol));
+ DEPRECATED_SYMBOL_NAME (exp->elts[2].symbol));
return BADLINE;
}
}
{
default:
printf_filtered ("%s: don't know symbol class %d\n",
- SYMBOL_NAME (sym), SYMBOL_CLASS (sym));
+ DEPRECATED_SYMBOL_NAME (sym), SYMBOL_CLASS (sym));
break;
case LOC_CONST:
printf_filtered ("constant %s (value %ld) will not be collected.\n",
- SYMBOL_NAME (sym), SYMBOL_VALUE (sym));
+ DEPRECATED_SYMBOL_NAME (sym), SYMBOL_VALUE (sym));
break;
case LOC_STATIC:
offset = SYMBOL_VALUE_ADDRESS (sym);
sprintf_vma (tmp, offset);
printf_filtered ("LOC_STATIC %s: collect %ld bytes at %s.\n",
- SYMBOL_NAME (sym), len, tmp /* address */);
+ DEPRECATED_SYMBOL_NAME (sym), len, tmp /* address */);
}
add_memrange (collect, -1, offset, len); /* 0 == memory */
break;
case LOC_REGPARM:
reg = SYMBOL_VALUE (sym);
if (info_verbose)
- printf_filtered ("LOC_REG[parm] %s: ", SYMBOL_NAME (sym));
+ printf_filtered ("LOC_REG[parm] %s: ", DEPRECATED_SYMBOL_NAME (sym));
add_register (collect, reg);
/* check for doubles stored in two registers */
/* FIXME: how about larger types stored in 3 or more regs? */
case LOC_REF_ARG:
printf_filtered ("Sorry, don't know how to do LOC_REF_ARG yet.\n");
printf_filtered (" (will not collect %s)\n",
- SYMBOL_NAME (sym));
+ DEPRECATED_SYMBOL_NAME (sym));
break;
case LOC_ARG:
reg = frame_regno;
if (info_verbose)
{
printf_filtered ("LOC_LOCAL %s: Collect %ld bytes at offset ",
- SYMBOL_NAME (sym), len);
+ DEPRECATED_SYMBOL_NAME (sym), len);
printf_vma (offset);
printf_filtered (" from frame ptr reg %d\n", reg);
}
if (info_verbose)
{
printf_filtered ("LOC_REGPARM_ADDR %s: Collect %ld bytes at offset ",
- SYMBOL_NAME (sym), len);
+ DEPRECATED_SYMBOL_NAME (sym), len);
printf_vma (offset);
printf_filtered (" from reg %d\n", reg);
}
if (info_verbose)
{
printf_filtered ("LOC_LOCAL %s: Collect %ld bytes at offset ",
- SYMBOL_NAME (sym), len);
+ DEPRECATED_SYMBOL_NAME (sym), len);
printf_vma (offset);
printf_filtered (" from frame ptr reg %d\n", reg);
}
if (info_verbose)
{
printf_filtered ("LOC_BASEREG %s: collect %ld bytes at offset ",
- SYMBOL_NAME (sym), len);
+ DEPRECATED_SYMBOL_NAME (sym), len);
printf_vma (offset);
printf_filtered (" from basereg %d\n", reg);
}
add_memrange (collect, reg, offset, len);
break;
case LOC_UNRESOLVED:
- printf_filtered ("Don't know LOC_UNRESOLVED %s\n", SYMBOL_NAME (sym));
+ printf_filtered ("Don't know LOC_UNRESOLVED %s\n", DEPRECATED_SYMBOL_NAME (sym));
break;
case LOC_OPTIMIZED_OUT:
printf_filtered ("%s has been optimized out of existence.\n",
- SYMBOL_NAME (sym));
+ DEPRECATED_SYMBOL_NAME (sym));
break;
}
}
{
default:
warning ("don't know how to trace local symbol %s",
- SYMBOL_NAME (sym));
+ DEPRECATED_SYMBOL_NAME (sym));
case LOC_LOCAL:
case LOC_STATIC:
case LOC_REGISTER:
printf_filtered ("Scope for %s:\n", save_args);
count++;
- symname = SYMBOL_NAME (sym);
+ symname = DEPRECATED_SYMBOL_NAME (sym);
if (symname == NULL || *symname == '\0')
continue; /* probably botched, certainly useless */
REGISTER_NAME (SYMBOL_BASEREG (sym)));
break;
case LOC_UNRESOLVED:
- msym = lookup_minimal_symbol (SYMBOL_NAME (sym), NULL, NULL);
+ msym = lookup_minimal_symbol (DEPRECATED_SYMBOL_NAME (sym), NULL, NULL);
if (msym == NULL)
printf_filtered ("Unresolved Static");
else
fprintf_filtered (stream, "typedef ");
type_print (type, "", stream, 0);
if (TYPE_NAME ((SYMBOL_TYPE (new))) == 0
- || strcmp (TYPE_NAME ((SYMBOL_TYPE (new))), SYMBOL_NAME (new)) != 0)
+ || strcmp (TYPE_NAME ((SYMBOL_TYPE (new))), DEPRECATED_SYMBOL_NAME (new)) != 0)
fprintf_filtered (stream, " %s", SYMBOL_PRINT_NAME (new));
break;
#endif
case language_m2:
fprintf_filtered (stream, "TYPE ");
if (!TYPE_NAME (SYMBOL_TYPE (new))
- || strcmp (TYPE_NAME ((SYMBOL_TYPE (new))), SYMBOL_NAME (new)) != 0)
+ || strcmp (TYPE_NAME ((SYMBOL_TYPE (new))), DEPRECATED_SYMBOL_NAME (new)) != 0)
fprintf_filtered (stream, "%s = ", SYMBOL_PRINT_NAME (new));
else
fprintf_filtered (stream, "<builtin> = ");
else
{
int i = -1;
- func_name = cplus_demangle (SYMBOL_NAME (fsym), DMGL_NO_OPTS);
+ func_name = cplus_demangle (DEPRECATED_SYMBOL_NAME (fsym), DMGL_NO_OPTS);
/* If the name is NULL this must be a C-style function.
Just return the same symbol. */
will be patched with the type from its stab entry later on in
patch_block_stabs (), unless the file was compiled without -g. */
- SYMBOL_NAME (sym) = SYMNAME_ALLOC (name, symname_alloced);
+ DEPRECATED_SYMBOL_NAME (sym) = SYMNAME_ALLOC (name, symname_alloced);
SYMBOL_TYPE (sym) = func_symbol_type;
SYMBOL_CLASS (sym) = LOC_BLOCK;