diff options
author | David Carlton <carlton@bactrian.org> | 2003-02-25 21:36:23 +0000 |
---|---|---|
committer | David Carlton <carlton@bactrian.org> | 2003-02-25 21:36:23 +0000 |
commit | 22abf04a5d5485d051adac9d2447ad2fcbfb2704 (patch) | |
tree | 4cc602d42798fb0345040dc76859ffd7d237f89e | |
parent | 1a5848f62595063a3b484e9475cb7e86bd03bb47 (diff) | |
download | fsf-binutils-gdb-22abf04a5d5485d051adac9d2447ad2fcbfb2704.zip fsf-binutils-gdb-22abf04a5d5485d051adac9d2447ad2fcbfb2704.tar.gz fsf-binutils-gdb-22abf04a5d5485d051adac9d2447ad2fcbfb2704.tar.bz2 |
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 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.
47 files changed, 365 insertions, 282 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c734338..71b00cb 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,31 @@ +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 diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y index 6651dfd..70e6e08 100644 --- a/gdb/ada-exp.y +++ b/gdb/ada-exp.y @@ -1,5 +1,5 @@ /* 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. @@ -802,7 +802,7 @@ write_object_renaming (orig_left_context, renaming) 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; @@ -944,7 +944,7 @@ write_object_renaming (orig_left_context, renaming) 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 diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 83d1090..bf0e6df 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -707,7 +707,7 @@ ada_suppress_symbol_printing (struct symbol *sym) if (SYMBOL_NAMESPACE (sym) == STRUCT_NAMESPACE) return 1; else - return is_suppressed_name (SYMBOL_NAME (sym)); + return is_suppressed_name (DEPRECATED_SYMBOL_NAME (sym)); } @@ -2565,8 +2565,8 @@ sort_choices (struct symbol *syms[], struct block *blocks[], int nsyms) 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]; @@ -3242,8 +3242,8 @@ lesseq_defined_than (struct symbol *sym0, struct symbol *sym1) { 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) @@ -3321,7 +3321,7 @@ ada_lookup_partial_symbol (struct partial_symtab *pst, const char *name, struct partial_symbol *psym = start[i]; if (SYMBOL_NAMESPACE (psym) == namespace && - wild_match (name, name_len, SYMBOL_NAME (psym))) + wild_match (name, name_len, DEPRECATED_SYMBOL_NAME (psym))) return psym; } return NULL; @@ -3337,11 +3337,11 @@ ada_lookup_partial_symbol (struct partial_symtab *pst, const char *name, { 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; @@ -3356,7 +3356,7 @@ ada_lookup_partial_symbol (struct partial_symtab *pst, const char *name, 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) { @@ -3364,7 +3364,7 @@ ada_lookup_partial_symbol (struct partial_symtab *pst, const char *name, 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; @@ -3379,11 +3379,11 @@ ada_lookup_partial_symbol (struct partial_symtab *pst, const char *name, { 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; @@ -3400,12 +3400,12 @@ ada_lookup_partial_symbol (struct partial_symtab *pst, const char *name, { 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) @@ -3414,7 +3414,7 @@ ada_lookup_partial_symbol (struct partial_symtab *pst, const char *name, 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; @@ -3497,7 +3497,7 @@ ada_lookup_minimal_symbol (const char *name) 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; } @@ -3531,7 +3531,7 @@ add_symbols_from_enclosing_procs (const char *name, namespace_enum namespace, /* 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; @@ -3600,15 +3600,15 @@ remove_extra_symbols (struct symbol **syms, struct block **blocks, int nsyms) 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])) @@ -3703,7 +3703,7 @@ ada_lookup_symbol_list (const char *name, struct block *block0, { 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)) { @@ -3718,13 +3718,13 @@ ada_lookup_symbol_list (const char *name, struct block *block0, 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); } @@ -3964,7 +3964,7 @@ ada_add_block_symbols (struct block *block, const char *name, 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)) { @@ -3999,11 +3999,11 @@ ada_add_block_symbols (struct block *block, const char *name, { 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; @@ -4017,7 +4017,7 @@ ada_add_block_symbols (struct block *block, const char *name, { 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) { @@ -4028,7 +4028,7 @@ ada_add_block_symbols (struct block *block, const char *name, } } 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)) { @@ -4074,11 +4074,11 @@ ada_add_block_symbols (struct block *block, const char *name, { 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; @@ -4096,12 +4096,12 @@ ada_add_block_symbols (struct block *block, const char *name, { 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) @@ -4113,7 +4113,7 @@ ada_add_block_symbols (struct block *block, const char *name, } } 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)) { @@ -4199,7 +4199,7 @@ fill_in_ada_prototype (struct symbol *func) 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; @@ -4213,7 +4213,7 @@ fill_in_ada_prototype (struct symbol *func) 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; @@ -4765,7 +4765,7 @@ debug_print_block (struct block *b) 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:"); @@ -4773,7 +4773,7 @@ debug_print_block (struct block *b) { 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"); } diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c index e0d8a93..1ebe600 100644 --- a/gdb/arm-linux-tdep.c +++ b/gdb/arm-linux-tdep.c @@ -363,8 +363,8 @@ find_minsym_and_objfile (char *name, struct objfile **objfile_p) 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; diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c index 6527a48..e5f3048 100644 --- a/gdb/ax-gdb.c +++ b/gdb/ax-gdb.c @@ -608,7 +608,7 @@ gen_var_ref (struct agent_expr *ax, struct axs_value *value, struct symbol *var) 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)); diff --git a/gdb/blockframe.c b/gdb/blockframe.c index 1f1659f..4096ab5 100644 --- a/gdb/blockframe.c +++ b/gdb/blockframe.c @@ -364,7 +364,7 @@ find_pc_sect_partial_function (CORE_ADDR pc, asection *section, char **name, { 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; } @@ -385,7 +385,7 @@ find_pc_sect_partial_function (CORE_ADDR pc, asection *section, char **name, 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; } @@ -416,7 +416,7 @@ find_pc_sect_partial_function (CORE_ADDR pc, asection *section, char **name, } 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 @@ -426,14 +426,14 @@ find_pc_sect_partial_function (CORE_ADDR pc, asection *section, char **name, 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 diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 5579df3..f27f3fc 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -5829,7 +5829,7 @@ get_catch_sals (int this_level_only) ALL_BLOCK_SYMBOLS (b, i, sym) { - if (STREQ (SYMBOL_NAME (sym), "default")) + if (STREQ (DEPRECATED_SYMBOL_NAME (sym), "default")) { if (have_default) continue; diff --git a/gdb/buildsym.c b/gdb/buildsym.c index 3cc9e8e..4c4ac90 100644 --- a/gdb/buildsym.c +++ b/gdb/buildsym.c @@ -137,7 +137,7 @@ find_symbol_in_list (struct pending *list, char *name, int length) { 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') { @@ -266,7 +266,7 @@ finish_block (struct symbol *symbol, struct pending **listhead, 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); diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index 66ee0a3..a07717a 100644 --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c @@ -218,7 +218,7 @@ c_val_print (struct type *type, char *valaddr, int embedded_offset, 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) diff --git a/gdb/coffread.c b/gdb/coffread.c index db41896..0f36b95 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -1429,15 +1429,15 @@ patch_opaque_types (struct symtab *s) 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) { @@ -1639,7 +1639,7 @@ process_coff_symbol (register struct coff_symbol *cs, } 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. */ @@ -1657,7 +1657,7 @@ process_coff_symbol (register struct coff_symbol *cs, 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; @@ -1675,11 +1675,11 @@ process_coff_symbol (register struct coff_symbol *cs, 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; @@ -2075,7 +2075,7 @@ coff_read_enum_type (int index, int length, int lastsym) 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; @@ -2123,7 +2123,7 @@ coff_read_enum_type (int index, int length, int lastsym) { 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; diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c index a260144..69f1b15 100644 --- a/gdb/cp-valprint.c +++ b/gdb/cp-valprint.c @@ -1,6 +1,6 @@ /* 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. @@ -130,7 +130,7 @@ cp_print_class_method (char *valaddr, 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; } diff --git a/gdb/dbxread.c b/gdb/dbxread.c index 6c90f14..11d038e 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -3261,13 +3261,13 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name, 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 diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 8f1afd0..c77642d 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -2927,7 +2927,7 @@ read_enumeration (struct die_info *die, struct objfile *objfile, * 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; @@ -5174,8 +5174,8 @@ new_symbol (struct die_info *die, struct type *type, struct objfile *objfile, 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); } @@ -5220,7 +5220,7 @@ dwarf2_const_value (struct attribute *attr, struct symbol *sym, { 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))); @@ -5236,7 +5236,7 @@ dwarf2_const_value (struct attribute *attr, struct symbol *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))); diff --git a/gdb/dwarfread.c b/gdb/dwarfread.c index 709c7da..40c89e3 100644 --- a/gdb/dwarfread.c +++ b/gdb/dwarfread.c @@ -1676,7 +1676,7 @@ enum_type (struct dieinfo *dip, struct objfile *objfile) 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; @@ -2979,7 +2979,7 @@ synthesize_typedef (struct dieinfo *dip, struct objfile *objfile, 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; diff --git a/gdb/expprint.c b/gdb/expprint.c index 5f2032d..d0e940b 100644 --- a/gdb/expprint.c +++ b/gdb/expprint.c @@ -890,7 +890,7 @@ dump_subexp (struct expression *exp, struct ui_file *stream, int elt) 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: diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c index 7f178a4..f67a260 100644 --- a/gdb/f-valprint.c +++ b/gdb/f-valprint.c @@ -1,5 +1,5 @@ /* 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. @@ -618,9 +618,9 @@ info_common_command (char *comname, int from_tty) 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 { @@ -628,7 +628,7 @@ info_common_command (char *comname, int from_tty) 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 @@ -654,7 +654,7 @@ info_common_command (char *comname, int from_tty) 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; @@ -710,9 +710,9 @@ there_is_a_visible_common_named (char *comname) 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 { @@ -720,7 +720,7 @@ there_is_a_visible_common_named (char *comname) 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); diff --git a/gdb/findvar.c b/gdb/findvar.c index d2a3025..973b990 100644 --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -629,7 +629,7 @@ addresses have not been bound by the dynamic loader. Try again when executable i { 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) diff --git a/gdb/gnu-v2-abi.c b/gdb/gnu-v2-abi.c index cb80c95..90186cc 100644 --- a/gdb/gnu-v2-abi.c +++ b/gdb/gnu-v2-abi.c @@ -250,7 +250,7 @@ gnuv2_value_rtti_type (struct value *v, int *full, int *top, int *using_enc) /* 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; diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index db497ef..03ad5e8 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -677,7 +677,7 @@ pc_in_interrupt_handler (CORE_ADDR pc) 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 @@ -795,7 +795,7 @@ find_proc_framesize (CORE_ADDR pc) 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; @@ -1153,7 +1153,7 @@ hppa_frame_chain (struct frame_info *frame) 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, @@ -1984,7 +1984,7 @@ find_stub_with_shl_get (struct minimal_symbol *function, CORE_ADDR handle) 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)); @@ -1997,7 +1997,7 @@ find_stub_with_shl_get (struct minimal_symbol *function, CORE_ADDR handle) /* 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); @@ -2235,10 +2235,10 @@ hppa_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, { 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. */ @@ -2339,7 +2339,7 @@ hppa_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, 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, @@ -3015,7 +3015,7 @@ hppa_in_solib_call_trampoline (CORE_ADDR pc, char *name) 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 @@ -3258,7 +3258,7 @@ hppa_skip_trampoline_code (CORE_ADDR pc) 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; @@ -3353,11 +3353,11 @@ hppa_skip_trampoline_code (CORE_ADDR pc) 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; } diff --git a/gdb/hpread.c b/gdb/hpread.c index bf53266..6acf576 100644 --- a/gdb/hpread.c +++ b/gdb/hpread.c @@ -3123,7 +3123,7 @@ hpread_read_enum_type (dnttpointer hp_type, union dnttentry *dn_bufp, 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; @@ -3157,7 +3157,7 @@ hpread_read_enum_type (dnttpointer hp_type, union dnttentry *dn_bufp, { 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; @@ -3231,7 +3231,7 @@ hpread_read_function_type (dnttpointer hp_type, union dnttentry *dn_bufp, 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. */ @@ -3318,7 +3318,7 @@ hpread_read_function_type (dnttpointer hp_type, union dnttentry *dn_bufp, 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; @@ -3405,7 +3405,7 @@ hpread_read_doc_function_type (dnttpointer hp_type, union dnttentry *dn_bufp, 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) @@ -3492,7 +3492,7 @@ hpread_read_doc_function_type (dnttpointer hp_type, union dnttentry *dn_bufp, 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; @@ -5085,7 +5085,7 @@ hpread_process_one_debug_symbol (union dnttentry *dn_bufp, char *name, 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; @@ -5255,22 +5255,22 @@ hpread_process_one_debug_symbol (union dnttentry *dn_bufp, char *name, 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. @@ -5289,7 +5289,7 @@ hpread_process_one_debug_symbol (union dnttentry *dn_bufp, char *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))) { @@ -5373,22 +5373,22 @@ hpread_process_one_debug_symbol (union dnttentry *dn_bufp, char *name, 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) { @@ -5406,7 +5406,7 @@ hpread_process_one_debug_symbol (union dnttentry *dn_bufp, char *name, */ 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))) { @@ -5711,7 +5711,7 @@ hpread_process_one_debug_symbol (union dnttentry *dn_bufp, char *name, * 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; @@ -5826,8 +5826,8 @@ hpread_process_one_debug_symbol (union dnttentry *dn_bufp, char *name, * 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)) @@ -5873,7 +5873,7 @@ hpread_process_one_debug_symbol (union dnttentry *dn_bufp, char *name, 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; diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c index 9bf5a16..b895f7d 100644 --- a/gdb/i386-linux-tdep.c +++ b/gdb/i386-linux-tdep.c @@ -332,8 +332,8 @@ find_minsym_and_objfile (char *name, struct objfile **objfile_p) 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; diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index d85073b..e2729f9 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -1293,7 +1293,7 @@ i386_pe_skip_trampoline_code (CORE_ADDR pc, char *name) 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) { diff --git a/gdb/jv-lang.c b/gdb/jv-lang.c index be82fe9..903404d 100644 --- a/gdb/jv-lang.c +++ b/gdb/jv-lang.c @@ -1,5 +1,5 @@ /* 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. @@ -164,7 +164,7 @@ add_class_symbol (struct type *type, CORE_ADDR addr) 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; diff --git a/gdb/linespec.c b/gdb/linespec.c index 141f5bb..9efe135 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -472,7 +472,7 @@ decode_line_2 (struct symbol *sym_arr[], int nelts, int funfirstline, { 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)); } } @@ -495,7 +495,7 @@ decode_line_2 (struct symbol *sym_arr[], int nelts, int funfirstline, { 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)); } diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c index 51536d7..7c17d61 100644 --- a/gdb/mdebugread.c +++ b/gdb/mdebugread.c @@ -670,7 +670,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend, /* 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; } @@ -1102,7 +1102,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend, 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; @@ -1373,7 +1373,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend, 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; @@ -4459,10 +4459,10 @@ mylookup_symbol (char *name, register struct block *block, 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; } @@ -4489,7 +4489,7 @@ add_symbol (struct symbol *s, struct block *b) 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; diff --git a/gdb/mi/ChangeLog b/gdb/mi/ChangeLog index 2be84ed..6d2f685 100644 --- a/gdb/mi/ChangeLog +++ b/gdb/mi/ChangeLog @@ -1,3 +1,8 @@ +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 diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c index d715bd3..0a76291 100644 --- a/gdb/mi/mi-cmd-stack.c +++ b/gdb/mi/mi-cmd-stack.c @@ -1,5 +1,5 @@ /* 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. @@ -273,13 +273,13 @@ list_args_or_locals (int locals, int values, struct frame_info *fi) 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); diff --git a/gdb/minsyms.c b/gdb/minsyms.c index e4b0596..057bd8fd 100644 --- a/gdb/minsyms.c +++ b/gdb/minsyms.c @@ -113,7 +113,7 @@ add_minsym_to_hash_table (struct minimal_symbol *sym, { 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; } @@ -659,8 +659,8 @@ compare_minimal_symbols (const void *fn1p, const void *fn2p) 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); @@ -752,7 +752,7 @@ compact_minimal_symbols (struct minimal_symbol *msymbol, int mcount, { 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) { @@ -867,9 +867,9 @@ install_minimal_symbols (struct objfile *objfile) 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; @@ -898,7 +898,7 @@ install_minimal_symbols (struct objfile *objfile) 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; @@ -918,7 +918,7 @@ install_minimal_symbols (struct objfile *objfile) 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"); @@ -981,7 +981,7 @@ find_solib_trampoline_target (CORE_ADDR pc) 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); } } diff --git a/gdb/mipsread.c b/gdb/mipsread.c index 1f869f4..293eaed 100644 --- a/gdb/mipsread.c +++ b/gdb/mipsread.c @@ -1,6 +1,6 @@ /* 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. @@ -118,7 +118,7 @@ mipscoff_symfile_read (struct objfile *objfile, int mainline) 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); diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c index 2421d6b..255781e 100644 --- a/gdb/objc-lang.c +++ b/gdb/objc-lang.c @@ -868,7 +868,7 @@ selectors_info (char *regexp, int from_tty) 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. */ @@ -901,7 +901,7 @@ selectors_info (char *regexp, int from_tty) 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. */ @@ -927,7 +927,7 @@ selectors_info (char *regexp, int from_tty) 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). */ @@ -1011,7 +1011,7 @@ classes_info (char *regexp, int from_tty) 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. */ @@ -1037,7 +1037,7 @@ classes_info (char *regexp, int from_tty) 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. */ @@ -1056,7 +1056,7 @@ classes_info (char *regexp, int from_tty) 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). */ @@ -1319,7 +1319,7 @@ find_methods (struct symtab *symtab, char type, symname = SYMBOL_DEMANGLED_NAME (msymbol); if (symname == NULL) - symname = SYMBOL_NAME (msymbol); + symname = DEPRECATED_SYMBOL_NAME (msymbol); if (symname == NULL) continue; @@ -1358,7 +1358,7 @@ find_methods (struct symtab *symtab, char type, 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 diff --git a/gdb/objfiles.c b/gdb/objfiles.c index 8f141b3..32a57fa 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -373,7 +373,7 @@ terminate_minimal_symbol_table (struct objfile *objfile) = &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; @@ -683,7 +683,7 @@ objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets) 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 diff --git a/gdb/objfiles.h b/gdb/objfiles.h index 7546623..e710263 100644 --- a/gdb/objfiles.h +++ b/gdb/objfiles.h @@ -587,7 +587,7 @@ extern int is_in_import_list (char *, struct objfile *); /* 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. */ diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c index 1592515..1f41422 100644 --- a/gdb/p-valprint.c +++ b/gdb/p-valprint.c @@ -226,7 +226,7 @@ pascal_val_print (struct type *type, char *valaddr, int embedded_offset, 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) @@ -647,7 +647,7 @@ pascal_object_print_class_method (char *valaddr, struct type *type, 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; } } diff --git a/gdb/printcmd.c b/gdb/printcmd.c index 96d987a..c7b0ffb 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -643,7 +643,7 @@ build_address_symbolic (CORE_ADDR addr, /* IN */ 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) @@ -658,7 +658,7 @@ build_address_symbolic (CORE_ADDR addr, /* IN */ 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) @@ -1122,7 +1122,7 @@ address_info (char *exp, int from_tty) } 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); @@ -1240,7 +1240,7 @@ address_info (char *exp, int from_tty) { 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 @@ -1840,11 +1840,11 @@ print_frame_args (struct symbol *func, struct frame_info *fi, int num, 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) { diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 2a7bfc6..a8ed3d0 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -1444,7 +1444,7 @@ rs6000_skip_trampoline_code (CORE_ADDR pc) /* 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); diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c index dbff6e2..1d379e9 100644 --- a/gdb/sol-thread.c +++ b/gdb/sol-thread.c @@ -1,5 +1,5 @@ /* 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. @@ -1476,7 +1476,7 @@ info_cb (const td_thrhandle_t *th, void *s) 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)); } @@ -1487,7 +1487,7 @@ info_cb (const td_thrhandle_t *th, void *s) 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)); } diff --git a/gdb/somsolib.c b/gdb/somsolib.c index c66946b..08d3e1c 100644 --- a/gdb/somsolib.c +++ b/gdb/somsolib.c @@ -938,7 +938,7 @@ som_solib_create_inferior_hook (void) 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) diff --git a/gdb/stabsread.c b/gdb/stabsread.c index ee3b400..cf7a21b 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -420,7 +420,7 @@ patch_block_stabs (struct pending *symbols, struct pending_stabs *stabs, 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') @@ -940,13 +940,13 @@ read_type_number (register char **pp, register int *typenums) // 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); @@ -1073,7 +1073,7 @@ resolve_symbol_reference (struct objfile *objfile, struct symbol *sym, char *p) 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; @@ -1277,16 +1277,16 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, 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; @@ -1324,14 +1324,14 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, 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; @@ -1576,9 +1576,9 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, 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; } @@ -1778,7 +1778,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, 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 @@ -1801,13 +1801,13 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int 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); } } @@ -1852,7 +1852,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, 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 @@ -1892,11 +1892,11 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, /* 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); @@ -1931,7 +1931,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, 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) @@ -1945,7 +1945,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, 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; @@ -1956,13 +1956,13 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int 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); } } @@ -2395,7 +2395,7 @@ again: 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); @@ -4497,7 +4497,7 @@ read_enum_type (register char **pp, register struct type *type, 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; @@ -4539,7 +4539,7 @@ read_enum_type (register char **pp, register struct type *type, { 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; } @@ -5072,7 +5072,7 @@ common_block_end (struct objfile *objfile) 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. */ @@ -5099,7 +5099,7 @@ common_block_end (struct objfile *objfile) /* 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; @@ -5190,7 +5190,7 @@ cleanup_undefined_types (void) && 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)); } } @@ -5246,7 +5246,7 @@ scan_file_globals (struct objfile *objfile) return; for (msymbol = resolve_objfile->msymbols; - msymbol && SYMBOL_NAME (msymbol) != NULL; + msymbol && DEPRECATED_SYMBOL_NAME (msymbol) != NULL; msymbol++) { QUIT; @@ -5267,12 +5267,12 @@ scan_file_globals (struct objfile *objfile) /* 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; @@ -5364,7 +5364,7 @@ scan_file_globals (struct objfile *objfile) 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)); diff --git a/gdb/stack.c b/gdb/stack.c index 1263ed9..d96f46b 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -356,7 +356,7 @@ print_frame (struct frame_info *fi, /* 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 @@ -373,7 +373,7 @@ print_frame (struct frame_info *fi, 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) { @@ -391,7 +391,7 @@ print_frame (struct frame_info *fi, 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); } } @@ -653,7 +653,7 @@ frame_info (char *addr_exp, int from_tty) * 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) { @@ -671,7 +671,7 @@ frame_info (char *addr_exp, int from_tty) 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); } } @@ -1113,7 +1113,7 @@ print_block_frame_labels (struct block *b, int *have_default, ALL_BLOCK_SYMBOLS (b, i, sym) { - if (STREQ (SYMBOL_NAME (sym), "default")) + if (STREQ (DEPRECATED_SYMBOL_NAME (sym), "default")) { if (*have_default) continue; @@ -1326,7 +1326,7 @@ print_frame_arg_vars (register struct frame_info *fi, 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"); diff --git a/gdb/symfile.c b/gdb/symfile.c index 9615987..3b88c2f 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -2708,7 +2708,7 @@ add_psymbol_with_dem_name_to_list (char *name, int namelength, char *dem_name, 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); diff --git a/gdb/symmisc.c b/gdb/symmisc.c index 24f8f58..f6e78eb 100644 --- a/gdb/symmisc.c +++ b/gdb/symmisc.c @@ -98,7 +98,7 @@ free_symtab_block (struct objfile *objfile, struct block *b) 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); } } @@ -312,7 +312,7 @@ dump_msymbols (struct objfile *objfile, struct ui_file *outfile) return; } for (index = 0, msymbol = objfile->msymbols; - SYMBOL_NAME (msymbol) != NULL; msymbol++, index++) + DEPRECATED_SYMBOL_NAME (msymbol) != NULL; msymbol++, index++) { switch (msymbol->type) { @@ -349,7 +349,7 @@ dump_msymbols (struct objfile *objfile, struct ui_file *outfile) } 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, @@ -505,7 +505,7 @@ dump_symtab (struct objfile *objfile, struct symtab *symtab, 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", @@ -623,7 +623,7 @@ print_symbol (void *args) ? "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"); @@ -831,7 +831,7 @@ print_partial_symbols (struct partial_symbol **p, int count, char *what, 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)); @@ -1010,12 +1010,12 @@ maintenance_check_symtabs (char *ignore, int from_tty) 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"); @@ -1027,12 +1027,12 @@ maintenance_check_symtabs (char *ignore, int from_tty) 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"); diff --git a/gdb/symtab.c b/gdb/symtab.c index cb5ba7f..c9541fa 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -575,6 +575,25 @@ symbol_init_demangled_name (struct general_symbol_info *gsymbol, } } +/* 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 * @@ -1273,7 +1292,7 @@ lookup_symbol_aux_minsyms (const char *name, 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 @@ -1334,11 +1353,11 @@ lookup_symbol_aux_minsyms (const char *name, } 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); } @@ -1603,7 +1622,7 @@ lookup_block_symbol (register const struct block *block, const char *name, { 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; } @@ -1673,7 +1692,7 @@ lookup_block_symbol (register const struct block *block, const char *name, 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; @@ -1708,7 +1727,7 @@ lookup_block_symbol (register const struct block *block, const char *name, 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 @@ -2012,7 +2031,7 @@ find_pc_sect_line (CORE_ADDR pc, struct sec *section, int notcurrent) 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: @@ -2023,12 +2042,12 @@ find_pc_sect_line (CORE_ADDR pc, struct sec *section, int notcurrent) * 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); @@ -2960,7 +2979,7 @@ search_symbols (char *regexp, namespace_enum kind, int nfiles, char *files[], 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) @@ -3050,7 +3069,7 @@ search_symbols (char *regexp, namespace_enum kind, int nfiles, char *files[], (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) { @@ -3231,11 +3250,11 @@ rbreak_command (char *regexp, int from_tty) 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, @@ -3246,7 +3265,7 @@ rbreak_command (char *regexp, int from_tty) } 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)); } @@ -3272,7 +3291,7 @@ static char **return_val; (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 @@ -3928,7 +3947,7 @@ overload_list_add_symbol (struct symbol *sym, char *oload_name) /* 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 */ diff --git a/gdb/symtab.h b/gdb/symtab.h index 0d1b41c..227736d 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -54,9 +54,11 @@ struct agent_expr; 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; @@ -90,9 +92,9 @@ struct general_symbol_info 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; @@ -129,7 +131,7 @@ extern CORE_ADDR symbol_overlayed_address (CORE_ADDR, asection *); 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 @@ -160,6 +162,37 @@ extern void symbol_set_names (struct general_symbol_info *symbol, 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) \ @@ -175,9 +208,7 @@ extern char *symbol_demangled_name (struct general_symbol_info *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 @@ -187,7 +218,7 @@ extern char *symbol_demangled_name (struct general_symbol_info *symbol); 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)) @@ -197,7 +228,7 @@ extern char *symbol_demangled_name (struct general_symbol_info *symbol); 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)) diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index fc0620f..855a5b2 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -280,12 +280,12 @@ set_traceframe_context (CORE_ADDR trace_pc) /* 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, @@ -293,7 +293,7 @@ set_traceframe_context (CORE_ADDR trace_pc) 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); @@ -960,14 +960,14 @@ validate_actionline (char **line, struct tracepoint *t) 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; } } @@ -1187,11 +1187,11 @@ collect_symbol (struct collection_list *collect, struct symbol *sym, { 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); @@ -1201,7 +1201,7 @@ collect_symbol (struct collection_list *collect, struct symbol *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; @@ -1209,7 +1209,7 @@ collect_symbol (struct collection_list *collect, struct symbol *sym, 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? */ @@ -1220,7 +1220,7 @@ collect_symbol (struct collection_list *collect, struct symbol *sym, 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; @@ -1228,7 +1228,7 @@ collect_symbol (struct collection_list *collect, struct symbol *sym, 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); } @@ -1240,7 +1240,7 @@ collect_symbol (struct collection_list *collect, struct symbol *sym, 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); } @@ -1253,7 +1253,7 @@ collect_symbol (struct collection_list *collect, struct symbol *sym, 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); } @@ -1266,18 +1266,18 @@ collect_symbol (struct collection_list *collect, struct symbol *sym, 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; } } @@ -1301,7 +1301,7 @@ add_local_symbols (struct collection_list *collect, CORE_ADDR pc, { 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: @@ -2356,7 +2356,7 @@ scope_info (char *args, int from_tty) 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 */ @@ -2432,7 +2432,7 @@ scope_info (char *args, int from_tty) 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 diff --git a/gdb/typeprint.c b/gdb/typeprint.c index 9786b2a..22a1eab 100644 --- a/gdb/typeprint.c +++ b/gdb/typeprint.c @@ -67,7 +67,7 @@ typedef_print (struct type *type, struct symbol *new, struct ui_file *stream) 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 @@ -75,7 +75,7 @@ typedef_print (struct type *type, struct symbol *new, struct ui_file *stream) 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> = "); diff --git a/gdb/valops.c b/gdb/valops.c index a9b97cd..bd340e8 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -2735,7 +2735,7 @@ find_overload_match (struct type **arg_types, int nargs, char *name, int method, 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. */ diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c index 991acdc..dd6541a 100644 --- a/gdb/xcoffread.c +++ b/gdb/xcoffread.c @@ -1478,7 +1478,7 @@ process_xcoff_symbol (register struct coff_symbol *cs, struct objfile *objfile) 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; |