+2019-11-22 Christian Biesinger <cbiesinger@google.com>
+
+ * ada-exp.y: Update.
+ * ada-lang.c (sort_choices): Update.
+ (ada_print_symbol_signature): Update.
+ (resolve_subexp): Update.
+ (ada_parse_renaming): Update.
+ (ada_read_renaming_var_value): Update.
+ (lesseq_defined_than): Update.
+ (remove_extra_symbols): Update.
+ (remove_irrelevant_renamings): Update.
+ (ada_add_block_symbols): Update.
+ (ada_collect_symbol_completion_matches): Update.
+ (ada_is_renaming_symbol): Update.
+ (aggregate_assign_from_choices): Update.
+ (ada_evaluate_subexp): Update.
+ (ada_has_this_exception_support): Update.
+ (ada_is_non_standard_exception_sym): Update.
+ (ada_add_exceptions_from_frame): Update.
+ (ada_add_global_exceptions): Update.
+ (ada_print_subexp): Update.
+ * ax-gdb.c (gen_var_ref): Update.
+ (gen_maybe_namespace_elt): Update.
+ (gen_expr_for_cast): Update.
+ (gen_expr): Update.
+ * block.h: Update.
+ * blockframe.c (find_pc_partial_function): Update.
+ * breakpoint.c (print_breakpoint_location): Update.
+ (update_static_tracepoint): Update.
+ * btrace.c (ftrace_print_function_name): Update.
+ (ftrace_function_switched): Update.
+ * buildsym.c (find_symbol_in_list): Update.
+ * c-exp.y: Update.
+ * c-typeprint.c (c_print_typedef): Update.
+ (c_type_print_template_args): Update.
+ * cli/cli-cmds.c (edit_command): Update.
+ (list_command): Update.
+ (print_sal_location): Update.
+ * coffread.c (patch_opaque_types): Update.
+ (process_coff_symbol): Update.
+ (coff_read_enum_type): Update.
+ * compile/compile-c-symbols.c (c_symbol_substitution_name): Update.
+ (convert_one_symbol): Update.
+ (hash_symname): Update.
+ (eq_symname): Update.
+ * compile/compile-cplus-symbols.c (convert_one_symbol): Update.
+ * compile/compile-cplus-types.c (debug_print_scope): Update.
+ * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Update.
+ * compile/compile-object-load.c (get_out_value_type): Update.
+ * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
+ (search_symbol_list): Update.
+ (cp_lookup_symbol_imports_or_template): Update.
+ * cp-support.c (overload_list_add_symbol): Update.
+ * ctfread.c (psymtab_to_symtab): Update.
+ * dbxread.c (cp_set_block_scope): Update.
+ * dictionary.c (iter_match_first_hashed): Update.
+ (iter_match_next_hashed): Update.
+ (insert_symbol_hashed): Update.
+ (iter_match_next_linear): Update.
+ * dictionary.h: Update.
+ * dwarf2loc.c (func_get_frame_base_dwarf_block): Update.
+ (locexpr_describe_location_piece): Update.
+ (locexpr_describe_location_1): Update.
+ (locexpr_generate_c_location): Update.
+ (loclist_describe_location): Update.
+ (loclist_generate_c_location): Update.
+ * dwarf2read.c (dw2_debug_names_lookup_symbol): Update.
+ (read_func_scope): Update.
+ (process_enumeration_scope): Update.
+ (new_symbol): Update.
+ (dwarf2_const_value): Update.
+ (dwarf2_symbol_mark_computed): Update.
+ * eval.c (evaluate_funcall): Update.
+ (evaluate_subexp_standard): Update.
+ * expprint.c (print_subexp_standard): Update.
+ (dump_subexp_body_standard): Update.
+ * f-valprint.c (info_common_command_for_block): Update.
+ * findvar.c (get_hosting_frame): Update.
+ (default_read_var_value): Update.
+ * go-lang.c (go_symbol_package_name): Update.
+ * guile/scm-block.c (bkscm_print_block_smob): Update.
+ * guile/scm-symbol.c (syscm_print_symbol_smob): Update.
+ (gdbscm_symbol_name): Update.
+ (gdbscm_symbol_linkage_name): Update.
+ (gdbscm_symbol_print_name): Update.
+ * infcall.c (get_function_name): Update.
+ * infcmd.c (jump_command): Update.
+ (finish_command): Update.
+ * infrun.c (insert_exception_resume_breakpoint): Update.
+ * linespec.c (canonicalize_linespec): Update.
+ (create_sals_line_offset): Update.
+ (convert_linespec_to_sals): Update.
+ (complete_label): Update.
+ (find_label_symbols_in_block): Update.
+ * m2-typeprint.c (m2_print_typedef): Update.
+ * mdebugread.c (mdebug_reg_to_regnum): Update.
+ (parse_symbol): Update.
+ (mylookup_symbol): Update.
+ * mi/mi-cmd-stack.c (list_arg_or_local): Update.
+ (list_args_or_locals): Update.
+ * objc-lang.c (compare_selectors): Update.
+ (info_selectors_command): Update.
+ (compare_classes): Update.
+ (info_classes_command): Update.
+ (find_imps): Update.
+ * p-typeprint.c (pascal_print_typedef): Update.
+ * printcmd.c (build_address_symbolic): Update.
+ (info_address_command): Update.
+ (print_variable_and_value): Update.
+ * python/py-framefilter.c (extract_sym): Update.
+ (py_print_single_arg): Update.
+ * python/py-symbol.c (sympy_str): Update.
+ (sympy_get_name): Update.
+ (sympy_get_linkage_name): Update.
+ * python/python.c (gdbpy_rbreak): Update.
+ * record-btrace.c (btrace_get_bfun_name): Update.
+ (btrace_call_history): Update.
+ * rust-lang.c (rust_print_typedef): Update.
+ * solib-frv.c (frv_fdpic_find_canonical_descriptor): Update.
+ * stabsread.c (stab_reg_to_regnum): Update.
+ (define_symbol): Update.
+ (read_enum_type): Update.
+ (common_block_end): Update.
+ (cleanup_undefined_types_1): Update.
+ (scan_file_globals): Update.
+ * stack.c (print_frame_arg): Update.
+ (print_frame_args): Update.
+ (find_frame_funname): Update.
+ (info_frame_command_core): Update.
+ (iterate_over_block_locals): Update.
+ (print_block_frame_labels): Update.
+ (do_print_variable_and_value): Update.
+ (iterate_over_block_arg_vars): Update.
+ (return_command): Update.
+ * symmisc.c (dump_symtab_1): Update.
+ (print_symbol): Update.
+ * symtab.c (eq_symbol_entry): Update.
+ (symbol_cache_dump): Update.
+ (lookup_language_this): Update.
+ (find_pc_sect_line): Update.
+ (skip_prologue_sal): Update.
+ (symbol_search::compare_search_syms): Update.
+ (treg_matches_sym_type_name): Update.
+ (search_symbols): Update.
+ (print_symbol_info): Update.
+ (rbreak_command): Update.
+ (completion_list_add_symbol): Update.
+ (find_gnu_ifunc): Update.
+ (get_symbol_address): Update.
+ (search_module_symbols): Update.
+ (info_module_subcommand): Update.
+ * symtab.h (SYMBOL_NATURAL_NAME): Remove.
+ (SYMBOL_LINKAGE_NAME): Remove.
+ (SYMBOL_DEMANGLED_NAME): Remove.
+ (SYMBOL_PRINT_NAME): Remove.
+ (SYMBOL_SEARCH_NAME): Remove.
+ * tracepoint.c (set_traceframe_context): Update.
+ (validate_actionline): Update.
+ (collection_list::collect_symbol): Update.
+ (encode_actions_1): Update.
+ (info_scope_command): Update.
+ (print_one_static_tracepoint_marker): Update.
+ * typeprint.c (typedef_hash_table::add_template_parameters): Update.
+ * valops.c (address_of_variable): Update.
+ (find_overload_match): Update.
+ (find_oload_champ): Update.
+
2019-11-22 Christian Biesinger <cbiesinger@google.com>
* ada-lang.c (ada_lookup_simple_minsym): Update.
struct symbol *sym = new (&temp_parse_space) symbol ();
SYMBOL_DOMAIN (sym) = UNDEF_DOMAIN;
- SYMBOL_LINKAGE_NAME (sym) = obstack_strndup (&temp_parse_space, name, len);
+ SYMBOL_SET_LINKAGE_NAME (sym,
+ obstack_strndup (&temp_parse_space, name, len));
SYMBOL_LANGUAGE (sym) = language_ada;
write_exp_elt_opcode (par_state, OP_VAR_VALUE);
for (j = i - 1; j >= 0; j -= 1)
{
- if (encoded_ordered_before (SYMBOL_LINKAGE_NAME (syms[j].symbol),
- SYMBOL_LINKAGE_NAME (sym.symbol)))
+ if (encoded_ordered_before (syms[j].symbol->linkage_name (),
+ sym.symbol->linkage_name ()))
break;
syms[j + 1] = syms[j];
}
{
struct type *type = SYMBOL_TYPE (sym);
- fprintf_filtered (stream, "%s", SYMBOL_PRINT_NAME (sym));
+ fprintf_filtered (stream, "%s", sym->print_name ());
if (!print_signatures
|| type == NULL
|| TYPE_CODE (type) != TYPE_CODE_FUNC)
ada_print_type (SYMBOL_TYPE (syms[i].symbol), NULL,
gdb_stdout, -1, 0, &type_print_raw_options);
printf_filtered (_("'(%s) (enumeral)\n"),
- SYMBOL_PRINT_NAME (syms[i].symbol));
+ syms[i].symbol->print_name ());
}
else
{
int n_candidates;
n_candidates =
- ada_lookup_symbol_list (SYMBOL_LINKAGE_NAME
- (exp->elts[pc + 2].symbol),
+ ada_lookup_symbol_list (exp->elts[pc + 2].symbol->linkage_name (),
exp->elts[pc + 1].block, VAR_DOMAIN,
&candidates);
if (n_candidates == 0)
error (_("No definition found for %s"),
- SYMBOL_PRINT_NAME (exp->elts[pc + 2].symbol));
+ exp->elts[pc + 2].symbol->print_name ());
else if (n_candidates == 1)
i = 0;
else if (deprocedure_p
{
i = ada_resolve_function
(candidates.data (), n_candidates, NULL, 0,
- SYMBOL_LINKAGE_NAME (exp->elts[pc + 2].symbol),
+ exp->elts[pc + 2].symbol->linkage_name (),
context_type, parse_completion);
if (i < 0)
error (_("Could not find a match for %s"),
- SYMBOL_PRINT_NAME (exp->elts[pc + 2].symbol));
+ exp->elts[pc + 2].symbol->print_name ());
}
else
{
printf_filtered (_("Multiple matches for %s\n"),
- SYMBOL_PRINT_NAME (exp->elts[pc + 2].symbol));
+ exp->elts[pc + 2].symbol->print_name ());
user_select_syms (candidates.data (), n_candidates, 1);
i = 0;
}
int n_candidates;
n_candidates =
- ada_lookup_symbol_list (SYMBOL_LINKAGE_NAME
- (exp->elts[pc + 5].symbol),
+ ada_lookup_symbol_list (exp->elts[pc + 5].symbol->linkage_name (),
exp->elts[pc + 4].block, VAR_DOMAIN,
&candidates);
i = ada_resolve_function
(candidates.data (), n_candidates,
argvec, nargs,
- SYMBOL_LINKAGE_NAME (exp->elts[pc + 5].symbol),
+ exp->elts[pc + 5].symbol->linkage_name (),
context_type, parse_completion);
if (i < 0)
error (_("Could not find a match for %s"),
- SYMBOL_PRINT_NAME (exp->elts[pc + 5].symbol));
+ exp->elts[pc + 5].symbol->print_name ());
}
exp->elts[pc + 4].block = candidates[i].block;
case LOC_STATIC:
case LOC_COMPUTED:
case LOC_OPTIMIZED_OUT:
- info = strstr (SYMBOL_LINKAGE_NAME (sym), "___XR");
+ info = strstr (sym->linkage_name (), "___XR");
if (info == NULL)
return ADA_NOT_RENAMING;
switch (info[5])
{
const char *sym_name;
- sym_name = SYMBOL_LINKAGE_NAME (renaming_sym);
+ sym_name = renaming_sym->linkage_name ();
expression_up expr = parse_exp_1 (&sym_name, 0, block, 0);
return evaluate_expression (expr.get ());
}
{
struct type *type0 = SYMBOL_TYPE (sym0);
struct type *type1 = SYMBOL_TYPE (sym1);
- const char *name0 = SYMBOL_LINKAGE_NAME (sym0);
- const char *name1 = SYMBOL_LINKAGE_NAME (sym1);
+ const char *name0 = sym0->linkage_name ();
+ const char *name1 = sym1->linkage_name ();
int len0 = strlen (name0);
return
case LOC_STATIC:
{
- const char *name0 = SYMBOL_LINKAGE_NAME (sym0);
- const char *name1 = SYMBOL_LINKAGE_NAME (sym1);
+ const char *name0 = sym0->linkage_name ();
+ const char *name1 = sym1->linkage_name ();
return (strcmp (name0, name1) == 0
&& SYMBOL_VALUE_ADDRESS (sym0) == SYMBOL_VALUE_ADDRESS (sym1));
}
the get rid of the stub. */
if (TYPE_STUB (SYMBOL_TYPE ((*syms)[i].symbol))
- && SYMBOL_LINKAGE_NAME ((*syms)[i].symbol) != NULL)
+ && (*syms)[i].symbol->linkage_name () != NULL)
{
for (j = 0; j < syms->size (); j++)
{
if (j != i
&& !TYPE_STUB (SYMBOL_TYPE ((*syms)[j].symbol))
- && SYMBOL_LINKAGE_NAME ((*syms)[j].symbol) != NULL
- && strcmp (SYMBOL_LINKAGE_NAME ((*syms)[i].symbol),
- SYMBOL_LINKAGE_NAME ((*syms)[j].symbol)) == 0)
+ && (*syms)[j].symbol->linkage_name () != NULL
+ && strcmp ((*syms)[i].symbol->linkage_name (),
+ (*syms)[j].symbol->linkage_name ()) == 0)
remove_p = 1;
}
}
/* Two symbols with the same name, same class and same address
should be identical. */
- else if (SYMBOL_LINKAGE_NAME ((*syms)[i].symbol) != NULL
+ else if ((*syms)[i].symbol->linkage_name () != NULL
&& SYMBOL_CLASS ((*syms)[i].symbol) == LOC_STATIC
&& is_nondebugging_type (SYMBOL_TYPE ((*syms)[i].symbol)))
{
for (j = 0; j < syms->size (); j += 1)
{
if (i != j
- && SYMBOL_LINKAGE_NAME ((*syms)[j].symbol) != NULL
- && strcmp (SYMBOL_LINKAGE_NAME ((*syms)[i].symbol),
- SYMBOL_LINKAGE_NAME ((*syms)[j].symbol)) == 0
+ && (*syms)[j].symbol->linkage_name () != NULL
+ && strcmp ((*syms)[i].symbol->linkage_name (),
+ (*syms)[j].symbol->linkage_name ()) == 0
&& SYMBOL_CLASS ((*syms)[i].symbol)
== SYMBOL_CLASS ((*syms)[j].symbol)
&& SYMBOL_VALUE_ADDRESS ((*syms)[i].symbol)
if (sym == NULL || SYMBOL_CLASS (sym) == LOC_TYPEDEF)
continue;
- name = SYMBOL_LINKAGE_NAME (sym);
+ name = sym->linkage_name ();
suffix = strstr (name, "___XR");
if (suffix != NULL)
is_new_style_renaming = 1;
for (j = 0; j < syms->size (); j += 1)
if (i != j && (*syms)[j].symbol != NULL
- && strncmp (name, SYMBOL_LINKAGE_NAME ((*syms)[j].symbol),
+ && strncmp (name, (*syms)[j].symbol->linkage_name (),
name_len) == 0
&& block == (*syms)[j].block)
(*syms)[j].symbol = NULL;
if (current_function == NULL)
return syms->size ();
- current_function_name = SYMBOL_LINKAGE_NAME (current_function);
+ current_function_name = current_function->linkage_name ();
if (current_function_name == NULL)
return syms->size ();
{
int cmp;
- cmp = (int) '_' - (int) SYMBOL_LINKAGE_NAME (sym)[0];
+ cmp = (int) '_' - (int) sym->linkage_name ()[0];
if (cmp == 0)
{
- cmp = !startswith (SYMBOL_LINKAGE_NAME (sym), "_ada_");
+ cmp = !startswith (sym->linkage_name (), "_ada_");
if (cmp == 0)
- cmp = strncmp (name, SYMBOL_LINKAGE_NAME (sym) + 5,
+ cmp = strncmp (name, sym->linkage_name () + 5,
name_len);
}
if (cmp == 0
- && is_name_suffix (SYMBOL_LINKAGE_NAME (sym) + name_len + 5))
+ && is_name_suffix (sym->linkage_name () + name_len + 5))
{
if (SYMBOL_CLASS (sym) != LOC_UNRESOLVED)
{
completion_list_add_name (tracker,
SYMBOL_LANGUAGE (sym),
- SYMBOL_LINKAGE_NAME (sym),
+ sym->linkage_name (),
lookup_name, text, word);
}
}
completion_list_add_name (tracker,
SYMBOL_LANGUAGE (sym),
- SYMBOL_LINKAGE_NAME (sym),
+ sym->linkage_name (),
lookup_name, text, word);
}
}
completion_list_add_name (tracker,
SYMBOL_LANGUAGE (sym),
- SYMBOL_LINKAGE_NAME (sym),
+ sym->linkage_name (),
lookup_name, text, word);
}
}
static bool
ada_is_renaming_symbol (struct symbol *name_sym)
{
- const char *name = SYMBOL_LINKAGE_NAME (name_sym);
+ const char *name = name_sym->linkage_name ();
return strstr (name, "___XR") != NULL;
}
name = &exp->elts[choice_pos + 2].string;
break;
case OP_VAR_VALUE:
- name = SYMBOL_NATURAL_NAME (exp->elts[choice_pos + 2].symbol);
+ name = exp->elts[choice_pos + 2].symbol->natural_name ();
break;
default:
error (_("Invalid record component association."));
context other than a function call, in which case, it is
invalid. */
error (_("Unexpected unresolved symbol, %s, during evaluation"),
- SYMBOL_PRINT_NAME (exp->elts[pc + 2].symbol));
+ exp->elts[pc + 2].symbol->print_name ());
if (noside == EVAL_AVOID_SIDE_EFFECTS)
{
if (exp->elts[*pos].opcode == OP_VAR_VALUE
&& SYMBOL_DOMAIN (exp->elts[pc + 5].symbol) == UNDEF_DOMAIN)
error (_("Unexpected unresolved symbol, %s, during evaluation"),
- SYMBOL_PRINT_NAME (exp->elts[pc + 5].symbol));
+ exp->elts[pc + 5].symbol->print_name ());
else
{
for (tem = 0; tem <= nargs; tem += 1)
if (SYMBOL_CLASS (sym) != LOC_BLOCK)
{
error (_("Symbol \"%s\" is not a function (class = %d)"),
- SYMBOL_LINKAGE_NAME (sym), SYMBOL_CLASS (sym));
+ sym->linkage_name (), SYMBOL_CLASS (sym));
return 0;
}
if (SYMBOL_CLASS (sym) != LOC_BLOCK)
{
error (_("Symbol \"%s\" is not a function (class = %d)"),
- SYMBOL_LINKAGE_NAME (sym), SYMBOL_CLASS (sym));
+ sym->linkage_name (), SYMBOL_CLASS (sym));
return 0;
}
return 0;
for (i = 0; i < ARRAY_SIZE (standard_exc); i++)
- if (strcmp (SYMBOL_LINKAGE_NAME (sym), standard_exc[i]) == 0)
+ if (strcmp (sym->linkage_name (), standard_exc[i]) == 0)
return 0; /* A standard exception. */
/* Numeric_Error is also a standard exception, so exclude it.
See the STANDARD_EXC description for more details as to why
this exception is not listed in that array. */
- if (strcmp (SYMBOL_LINKAGE_NAME (sym), "numeric_error") == 0)
+ if (strcmp (sym->linkage_name (), "numeric_error") == 0)
return 0;
return 1;
default:
if (ada_is_exception_sym (sym))
{
- struct ada_exc_info info = {SYMBOL_PRINT_NAME (sym),
+ struct ada_exc_info info = {sym->print_name (),
SYMBOL_VALUE_ADDRESS (sym)};
exceptions->push_back (info);
ALL_BLOCK_SYMBOLS (b, iter, sym)
if (ada_is_non_standard_exception_sym (sym)
- && name_matches_regex (SYMBOL_NATURAL_NAME (sym), preg))
+ && name_matches_regex (sym->natural_name (), preg))
{
struct ada_exc_info info
- = {SYMBOL_PRINT_NAME (sym), SYMBOL_VALUE_ADDRESS (sym)};
+ = {sym->print_name (), SYMBOL_VALUE_ADDRESS (sym)};
exceptions->push_back (info);
}
return;
case OP_VAR_VALUE:
- fputs_filtered (SYMBOL_NATURAL_NAME (exp->elts[pc + 2].symbol), stream);
+ fputs_filtered (exp->elts[pc + 2].symbol->natural_name (), stream);
return;
case BINOP_IN_BOUNDS:
case LOC_TYPEDEF:
error (_("Cannot compute value of typedef `%s'."),
- SYMBOL_PRINT_NAME (var));
+ var->print_name ());
break;
case LOC_BLOCK:
case LOC_UNRESOLVED:
{
struct bound_minimal_symbol msym
- = lookup_minimal_symbol (SYMBOL_LINKAGE_NAME (var), NULL, NULL);
+ = lookup_minimal_symbol (var->linkage_name (), NULL, NULL);
if (!msym.minsym)
- error (_("Couldn't resolve symbol `%s'."), SYMBOL_PRINT_NAME (var));
+ error (_("Couldn't resolve symbol `%s'."), var->print_name ());
/* Push the address of the variable. */
ax_const_l (ax, BMSYMBOL_VALUE_ADDRESS (msym));
default:
error (_("Cannot find value of botched symbol `%s'."),
- SYMBOL_PRINT_NAME (var));
+ var->print_name ());
break;
}
}
if (value->optimized_out)
error (_("`%s' has been optimized out, cannot use"),
- SYMBOL_PRINT_NAME (sym.symbol));
+ sym.symbol->print_name ());
return 1;
}
if (value->optimized_out)
error (_("`%s' has been optimized out, cannot use"),
- SYMBOL_PRINT_NAME ((*pc)[2].symbol));
+ (*pc)[2].symbol->print_name ());
}
else
gen_msym_var_ref (ax, value, (*pc)[2].msymbol, (*pc)[1].objfile);
if (value->optimized_out)
error (_("`%s' has been optimized out, cannot use"),
- SYMBOL_PRINT_NAME ((*pc)[2].symbol));
+ (*pc)[2].symbol->print_name ());
if (TYPE_CODE (value->type) == TYPE_CODE_ERROR)
- error_unknown_type (SYMBOL_PRINT_NAME ((*pc)[2].symbol));
+ error_unknown_type ((*pc)[2].symbol->print_name ());
(*pc) += 4;
break;
if (value->optimized_out)
error (_("`%s' has been optimized out, cannot use"),
- SYMBOL_PRINT_NAME (sym));
+ sym->print_name ());
(*pc) += 2;
}
extern struct symbol *block_iterator_next (struct block_iterator *iterator);
/* Initialize ITERATOR to point at the first symbol in BLOCK whose
- SYMBOL_SEARCH_NAME matches NAME, and return that first symbol, or
+ search_name () matches NAME, and return that first symbol, or
NULL if there are no such symbols. */
extern struct symbol *block_iter_match_first (const struct block *block,
struct block_iterator *iterator);
/* Advance ITERATOR to point at the next symbol in BLOCK whose
- SYMBOL_SEARCH_NAME matches NAME, or NULL if there are no more such
+ search_name () matches NAME, or NULL if there are no more such
symbols. Don't call this if you've previously received NULL from
block_iterator_match_first or block_iterator_match_next on this
iteration. And don't call it unless ITERATOR was created by a
{
const struct block *b = SYMBOL_BLOCK_VALUE (f);
- cache_pc_function_name = SYMBOL_LINKAGE_NAME (f);
+ cache_pc_function_name = f->linkage_name ();
cache_pc_function_section = section;
cache_pc_function_block = b;
if (sym)
{
uiout->text ("in ");
- uiout->field_string ("func", SYMBOL_PRINT_NAME (sym),
+ uiout->field_string ("func", sym->print_name (),
function_name_style.style ());
uiout->text (" ");
uiout->wrap_hint (wrap_indent_at_field (uiout, "what"));
uiout->text ("Now in ");
if (sym)
{
- uiout->field_string ("func", SYMBOL_PRINT_NAME (sym),
+ uiout->field_string ("func", sym->print_name (),
function_name_style.style ());
uiout->text (" at ");
}
sym = bfun->sym;
if (sym != NULL)
- return SYMBOL_PRINT_NAME (sym);
+ return sym->print_name ();
if (msym != NULL)
return msym->print_name ();
const char *bfname, *fname;
/* Check the function name. */
- if (strcmp (SYMBOL_LINKAGE_NAME (fun), SYMBOL_LINKAGE_NAME (sym)) != 0)
+ if (strcmp (fun->linkage_name (), sym->linkage_name ()) != 0)
return 1;
/* Check the location of those functions, as well. */
{
for (j = list->nsyms; --j >= 0;)
{
- pp = SYMBOL_LINKAGE_NAME (list->symbol[j]);
+ pp = list->symbol[j]->linkage_name ();
if (*pp == *name && strncmp (pp, name, length) == 0
&& pp[length] == '\0')
{
{
complaint (_("block end address less than block "
"start address in %s (patched it)"),
- SYMBOL_PRINT_NAME (symbol));
+ symbol->print_name ());
}
else
{
if (symbol)
{
complaint (_("inner block not inside outer block in %s"),
- SYMBOL_PRINT_NAME (symbol));
+ symbol->print_name ());
}
else
{
parser_fprintf (file, "ssym<name=%s, sym=%s, field_of_this=%d>",
copy_name (value.ssym.stoken).c_str (),
(value.ssym.sym.symbol == NULL
- ? "(null)" : SYMBOL_PRINT_NAME (value.ssym.sym.symbol)),
+ ? "(null)" : value.ssym.sym.symbol->print_name ()),
value.ssym.is_a_field_of_this);
break;
type_print (type, "", stream, -1);
if (TYPE_NAME ((SYMBOL_TYPE (new_symbol))) == 0
|| strcmp (TYPE_NAME ((SYMBOL_TYPE (new_symbol))),
- SYMBOL_LINKAGE_NAME (new_symbol)) != 0
+ new_symbol->linkage_name ()) != 0
|| TYPE_CODE (SYMBOL_TYPE (new_symbol)) == TYPE_CODE_TYPEDEF)
- fprintf_filtered (stream, " %s", SYMBOL_PRINT_NAME (new_symbol));
+ fprintf_filtered (stream, " %s", new_symbol->print_name ());
fprintf_filtered (stream, ";");
}
if (first)
{
wrap_here (" ");
- fprintf_filtered (stream, _("[with %s = "),
- SYMBOL_LINKAGE_NAME (sym));
+ fprintf_filtered (stream, _("[with %s = "), sym->linkage_name ());
first = 0;
}
else
{
fputs_filtered (", ", stream);
wrap_here (" ");
- fprintf_filtered (stream, "%s = ", SYMBOL_LINKAGE_NAME (sym));
+ fprintf_filtered (stream, "%s = ", sym->linkage_name ());
}
c_print_type (SYMBOL_TYPE (sym), "", stream, -1, 0, flags);
if (sym)
printf_filtered ("%s is in %s (%s:%d).\n",
paddress (gdbarch, sal.pc),
- SYMBOL_PRINT_NAME (sym),
+ sym->print_name (),
symtab_to_filename_for_display (sal.symtab),
sal.line);
else
if (sym)
printf_filtered ("%s is in %s (%s:%d).\n",
paddress (gdbarch, sal.pc),
- SYMBOL_PRINT_NAME (sym),
+ sym->print_name (),
symtab_to_filename_for_display (sal.symtab), sal.line);
else
printf_filtered ("%s is at %s:%d.\n",
const char *sym_name = NULL;
if (sal.symbol != NULL)
- sym_name = SYMBOL_PRINT_NAME (sal.symbol);
+ sym_name = sal.symbol->print_name ();
printf_filtered (_("file: \"%s\", line number: %d, symbol: \"%s\"\n"),
symtab_to_filename_for_display (sal.symtab),
sal.line, sym_name != NULL ? sym_name : "???");
&& TYPE_CODE (SYMBOL_TYPE (real_sym)) == TYPE_CODE_PTR
&& TYPE_LENGTH (TYPE_TARGET_TYPE (SYMBOL_TYPE (real_sym))) != 0)
{
- const char *name = SYMBOL_LINKAGE_NAME (real_sym);
+ const char *name = real_sym->linkage_name ();
int hash = hashname (name);
struct symbol *sym, *prev;
prev = 0;
for (sym = opaque_type_chain[hash]; sym;)
{
- if (name[0] == SYMBOL_LINKAGE_NAME (sym)[0]
- && strcmp (name + 1, SYMBOL_LINKAGE_NAME (sym) + 1) == 0)
+ if (name[0] == sym->linkage_name ()[0]
+ && strcmp (name + 1, sym->linkage_name () + 1) == 0)
{
if (prev)
{
}
else
TYPE_NAME (SYMBOL_TYPE (sym)) =
- xstrdup (SYMBOL_LINKAGE_NAME (sym));
+ xstrdup (sym->linkage_name ());
}
/* Keep track of any type which points to empty structured
&& TYPE_CODE (TYPE_TARGET_TYPE (SYMBOL_TYPE (sym)))
!= TYPE_CODE_UNDEF)
{
- int i = hashname (SYMBOL_LINKAGE_NAME (sym));
+ int i = hashname (sym->linkage_name ());
SYMBOL_VALUE_CHAIN (sym) = opaque_type_chain[i];
opaque_type_chain[i] = sym;
names for anonymous enums, structures, and unions, like
"~0fake" or ".0fake". Thanks, but no thanks... */
if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0)
- if (SYMBOL_LINKAGE_NAME (sym) != NULL
- && *SYMBOL_LINKAGE_NAME (sym) != '~'
- && *SYMBOL_LINKAGE_NAME (sym) != '.')
- TYPE_NAME (SYMBOL_TYPE (sym)) =
- xstrdup (SYMBOL_LINKAGE_NAME (sym));
+ if (sym->linkage_name () != NULL
+ && *sym->linkage_name () != '~'
+ && *sym->linkage_name () != '.')
+ TYPE_NAME (SYMBOL_TYPE (sym)) = xstrdup (sym->linkage_name ());
add_symbol_to_list (sym, get_file_symbols ());
break;
struct symbol *xsym = syms->symbol[j];
SYMBOL_TYPE (xsym) = type;
- TYPE_FIELD_NAME (type, n) = SYMBOL_LINKAGE_NAME (xsym);
+ TYPE_FIELD_NAME (type, n) = xsym->linkage_name ();
SET_FIELD_ENUMVAL (TYPE_FIELD (type, n), SYMBOL_VALUE (xsym));
if (SYMBOL_VALUE (xsym) < 0)
unsigned_enum = 0;
c_symbol_substitution_name (struct symbol *sym)
{
return gdb::unique_xmalloc_ptr<char>
- (concat ("__", SYMBOL_NATURAL_NAME (sym), "_ptr", (char *) NULL));
+ (concat ("__", sym->natural_name (), "_ptr", (char *) NULL));
}
/* Convert a given symbol, SYM, to the compiler's representation.
if (SYMBOL_DOMAIN (sym.symbol) == STRUCT_DOMAIN)
{
/* Binding a tag, so we don't need to build a decl. */
- context->plugin ().tagbind (SYMBOL_NATURAL_NAME (sym.symbol),
+ context->plugin ().tagbind (sym.symbol->natural_name (),
sym_type, filename, line);
}
else
return;
}
context->plugin ().build_constant
- (sym_type, SYMBOL_NATURAL_NAME (sym.symbol),
+ (sym_type, sym.symbol->natural_name (),
SYMBOL_VALUE (sym.symbol),
filename, line);
return;
case LOC_CONST_BYTES:
error (_("Unsupported LOC_CONST_BYTES for symbol \"%s\"."),
- SYMBOL_PRINT_NAME (sym.symbol));
+ sym.symbol->print_name ());
case LOC_UNDEF:
internal_error (__FILE__, __LINE__, _("LOC_UNDEF found for \"%s\"."),
- SYMBOL_PRINT_NAME (sym.symbol));
+ sym.symbol->print_name ());
case LOC_COMMON_BLOCK:
error (_("Fortran common block is unsupported for compilation "
"evaluaton of symbol \"%s\"."),
- SYMBOL_PRINT_NAME (sym.symbol));
+ sym.symbol->print_name ());
case LOC_OPTIMIZED_OUT:
error (_("Symbol \"%s\" cannot be used for compilation evaluation "
"as it is optimized out."),
- SYMBOL_PRINT_NAME (sym.symbol));
+ sym.symbol->print_name ());
case LOC_COMPUTED:
if (is_local)
warning (_("Symbol \"%s\" is thread-local and currently can only "
"be referenced from the current thread in "
"compiled code."),
- SYMBOL_PRINT_NAME (sym.symbol));
+ sym.symbol->print_name ());
/* FALLTHROUGH */
case LOC_UNRESOLVED:
/* 'symbol_name' cannot be used here as that one is used only for
if (frame == NULL)
error (_("Symbol \"%s\" cannot be used because "
"there is no selected frame"),
- SYMBOL_PRINT_NAME (sym.symbol));
+ sym.symbol->print_name ());
}
val = read_var_value (sym.symbol, sym.block, frame);
if (VALUE_LVAL (val) != lval_memory)
error (_("Symbol \"%s\" cannot be used for compilation "
"evaluation as its address has not been found."),
- SYMBOL_PRINT_NAME (sym.symbol));
+ sym.symbol->print_name ());
kind = GCC_C_SYMBOL_VARIABLE;
addr = value_address (val);
|| symbol_name == NULL)
{
decl = context->plugin ().build_decl
- (SYMBOL_NATURAL_NAME (sym.symbol),
+ (sym.symbol->natural_name (),
kind,
sym_type,
symbol_name.get (), addr,
{
const struct symbol *sym = (const struct symbol *) a;
- return htab_hash_string (SYMBOL_NATURAL_NAME (sym));
+ return htab_hash_string (sym->natural_name ());
}
/* A comparison function for hash tables that just looks at symbol
const struct symbol *syma = (const struct symbol *) a;
const struct symbol *symb = (const struct symbol *) b;
- return strcmp (SYMBOL_NATURAL_NAME (syma), SYMBOL_NATURAL_NAME (symb)) == 0;
+ return strcmp (syma->natural_name (), symb->natural_name ()) == 0;
}
/* If a symbol with the same name as SYM is already in HASHTAB, return
return;
}
instance->plugin ().build_constant
- (sym_type, SYMBOL_NATURAL_NAME (sym.symbol),
+ (sym_type, sym.symbol->natural_name (),
SYMBOL_VALUE (sym.symbol), filename, line);
return;
case LOC_CONST_BYTES:
error (_("Unsupported LOC_CONST_BYTES for symbol \"%s\"."),
- SYMBOL_PRINT_NAME (sym.symbol));
+ sym.symbol->print_name ());
case LOC_UNDEF:
internal_error (__FILE__, __LINE__, _("LOC_UNDEF found for \"%s\"."),
- SYMBOL_PRINT_NAME (sym.symbol));
+ sym.symbol->print_name ());
case LOC_COMMON_BLOCK:
error (_("Fortran common block is unsupported for compilation "
"evaluaton of symbol \"%s\"."),
- SYMBOL_PRINT_NAME (sym.symbol));
+ sym.symbol->print_name ());
case LOC_OPTIMIZED_OUT:
error (_("Symbol \"%s\" cannot be used for compilation evaluation "
"as it is optimized out."),
- SYMBOL_PRINT_NAME (sym.symbol));
+ sym.symbol->print_name ());
case LOC_COMPUTED:
if (is_local)
warning (_("Symbol \"%s\" is thread-local and currently can only "
"be referenced from the current thread in "
"compiled code."),
- SYMBOL_PRINT_NAME (sym.symbol));
+ sym.symbol->print_name ());
/* FALLTHROUGH */
case LOC_UNRESOLVED:
/* 'symbol_name' cannot be used here as that one is used only for
if (frame == nullptr)
error (_("Symbol \"%s\" cannot be used because "
"there is no selected frame"),
- SYMBOL_PRINT_NAME (sym.symbol));
+ sym.symbol->print_name ());
}
val = read_var_value (sym.symbol, sym.block, frame);
if (VALUE_LVAL (val) != lval_memory)
error (_("Symbol \"%s\" cannot be used for compilation "
"evaluation as its address has not been found."),
- SYMBOL_PRINT_NAME (sym.symbol));
+ sym.symbol->print_name ());
kind = GCC_CP_SYMBOL_VARIABLE;
addr = value_address (val);
if (!is_local)
{
compile_scope scope
- = instance->new_scope (SYMBOL_NATURAL_NAME (sym.symbol),
+ = instance->new_scope (sym.symbol->natural_name (),
SYMBOL_TYPE (sym.symbol));
if (scope.nested_type () != GCC_TYPE_NONE)
{
}
/* Get the `raw' name of the symbol. */
- if (name.empty () && SYMBOL_NATURAL_NAME (sym.symbol) != nullptr)
+ if (name.empty () && sym.symbol->natural_name () != nullptr)
name = compile_cplus_instance::decl_name
- (SYMBOL_NATURAL_NAME (sym.symbol)).get ();
+ (sym.symbol->natural_name ()).get ();
/* Define the decl. */
instance->plugin ().build_decl
for (const auto &comp: scope)
{
const char *symbol = (comp.bsymbol.symbol != nullptr
- ? SYMBOL_NATURAL_NAME (comp.bsymbol.symbol)
+ ? comp.bsymbol.symbol->natural_name ()
: "<none>");
printf_unfiltered ("\tname = %s, symbol = %s\n", comp.name.c_str (),
if (frame == NULL)
error (_("Symbol \"%s\" cannot be used because "
"there is no selected frame"),
- SYMBOL_PRINT_NAME (sym));
+ sym->print_name ());
val = read_var_value (sym, NULL, frame);
if (VALUE_LVAL (val) != lval_memory)
error (_("Symbol \"%s\" cannot be used for compilation evaluation "
"as its address has not been found."),
- SYMBOL_PRINT_NAME (sym));
+ sym->print_name ());
warning (_("Symbol \"%s\" is thread-local and currently can only "
"be referenced from the current thread in "
"compiled code."),
- SYMBOL_PRINT_NAME (sym));
+ sym->print_name ());
fprintfi_filtered (indent, stream, "%s = %s;\n",
result_name,
if (function != NULL
&& (BLOCK_SUPERBLOCK (function_block)
== BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK))
- && (strcmp_iw (SYMBOL_LINKAGE_NAME (function),
+ && (strcmp_iw (function->linkage_name (),
GCC_FE_WRAPPER_FUNCTION)
== 0))
break;
const struct symbol *const symbol,
struct objfile *const objfile)
{
- if (SYMBOL_DEMANGLED_NAME (symbol) != NULL)
+ if (symbol->demangled_name () != NULL)
{
- const char *name = SYMBOL_DEMANGLED_NAME (symbol);
+ const char *name = symbol->demangled_name ();
unsigned int previous_component;
unsigned int next_component;
/* Maybe we should store a dictionary in here instead. */
for (i = 0; i < num; ++i)
{
- if (strcmp (name, SYMBOL_NATURAL_NAME (syms[i])) == 0)
+ if (strcmp (name, syms[i]->natural_name ()) == 0)
return syms[i];
}
return NULL;
/* Search the template parameters of the function's defining
context. */
- if (SYMBOL_NATURAL_NAME (function))
+ if (function->natural_name ())
{
struct type *context;
- std::string name_copy (SYMBOL_NATURAL_NAME (function));
+ std::string name_copy (function->natural_name ());
const struct language_defn *lang = language_def (language_cplus);
struct gdbarch *arch = symbol_arch (function);
const struct block *parent = BLOCK_SUPERBLOCK (block);
/* skip any symbols that we've already considered. */
for (symbol *listed_sym : *overload_list)
- if (strcmp (SYMBOL_LINKAGE_NAME (sym),
- SYMBOL_LINKAGE_NAME (listed_sym)) == 0)
+ if (strcmp (sym->linkage_name (), listed_sym->linkage_name ()) == 0)
return;
/* Get the demangled name without parameters */
gdb::unique_xmalloc_ptr<char> sym_name
- = cp_remove_params (SYMBOL_NATURAL_NAME (sym));
+ = cp_remove_params (sym->natural_name ());
if (!sym_name)
return;
if (sym == NULL)
continue;
- set_symbol_address (ccp->of, sym, SYMBOL_LINKAGE_NAME (sym));
+ set_symbol_address (ccp->of, sym, sym->linkage_name ());
}
pst->readin = 1;
struct block *block,
struct obstack *obstack)
{
- if (SYMBOL_DEMANGLED_NAME (symbol) != NULL)
+ if (symbol->demangled_name () != NULL)
{
/* Try to figure out the appropriate namespace from the
demangled name. */
name of the class as well. This should be harmless, but
is a little unfortunate. */
- const char *name = SYMBOL_DEMANGLED_NAME (symbol);
+ const char *name = symbol->demangled_name ();
unsigned int prefix_len = cp_entire_prefix_len (name);
block_set_scope (block, obstack_strndup (obstack, name, prefix_len),
sym = sym->hash_next)
{
/* Warning: the order of arguments to compare matters! */
- if (matches_name (SYMBOL_SEARCH_NAME (sym), name, NULL))
+ if (matches_name (sym->search_name (), name, NULL))
break;
}
next != NULL;
next = next->hash_next)
{
- if (matches_name (SYMBOL_SEARCH_NAME (next), name, NULL))
+ if (matches_name (next->search_name (), name, NULL))
break;
}
language. The two may not use the same hashing algorithm. */
gdb_assert (SYMBOL_LANGUAGE (sym) == DICT_LANGUAGE (dict)->la_language);
- hash = search_name_hash (SYMBOL_LANGUAGE (sym), SYMBOL_SEARCH_NAME (sym));
+ hash = search_name_hash (SYMBOL_LANGUAGE (sym), sym->search_name ());
hash_index = hash % DICT_HASHED_NBUCKETS (dict);
sym->hash_next = buckets[hash_index];
buckets[hash_index] = sym;
{
sym = DICT_LINEAR_SYM (dict, i);
- if (matches_name (SYMBOL_SEARCH_NAME (sym), name, NULL))
+ if (matches_name (sym->search_name (), name, NULL))
{
retval = sym;
break;
extern struct symbol *mdict_iterator_next (struct mdict_iterator *miterator);
/* Initialize MITERATOR to point at the first symbol in MDICT whose
- SYMBOL_SEARCH_NAME is NAME, as tested using COMPARE (which must use
+ search_name () is NAME, as tested using COMPARE (which must use
the same conventions as strcmp_iw and be compatible with any
dictionary hashing function), and return that first symbol, or NULL
if there are no such symbols. */
struct mdict_iterator *miterator);
/* Advance MITERATOR to point at the next symbol in MDICT whose
- SYMBOL_SEARCH_NAME is NAME, as tested using COMPARE (see
+ search_name () is NAME, as tested using COMPARE (see
dict_iter_match_first), or NULL if there are no more such symbols.
Don't call this if you've previously received NULL from
mdict_iterator_match_first or mdict_iterator_match_next on this
if (*length == 0)
error (_("Could not find the frame base for \"%s\"."),
- SYMBOL_NATURAL_NAME (framefunc));
+ framefunc->natural_name ());
}
static CORE_ADDR
if (!b)
error (_("No block found for address for symbol \"%s\"."),
- SYMBOL_PRINT_NAME (symbol));
+ symbol->print_name ());
framefunc = block_linkage_function (b);
if (!framefunc)
error (_("No function found for block for symbol \"%s\"."),
- SYMBOL_PRINT_NAME (symbol));
+ symbol->print_name ());
func_get_frame_base_dwarf_block (framefunc, addr, &base_data, &base_size);
if (buf_end != base_data + base_size)
error (_("Unexpected opcode after "
"DW_OP_breg%u for symbol \"%s\"."),
- frame_reg, SYMBOL_PRINT_NAME (symbol));
+ frame_reg, symbol->print_name ());
}
else if (base_data[0] >= DW_OP_reg0 && base_data[0] <= DW_OP_reg31)
{
if (bad || data > end)
error (_("Corrupted DWARF2 expression for \"%s\"."),
- SYMBOL_PRINT_NAME (symbol));
+ symbol->print_name ());
}
/* Print a natural-language description of SYMBOL to STREAM. This
unsigned int addr_size = dwarf2_per_cu_addr_size (dlbaton->per_cu);
if (dlbaton->size == 0)
- error (_("symbol \"%s\" is optimized out"), SYMBOL_NATURAL_NAME (sym));
+ error (_("symbol \"%s\" is optimized out"), sym->natural_name ());
compile_dwarf_expr_to_c (stream, result_name,
sym, pc, gdbarch, registers_used, addr_size,
case DEBUG_LOC_BUFFER_OVERFLOW:
case DEBUG_LOC_INVALID_ENTRY:
error (_("Corrupted DWARF expression for symbol \"%s\"."),
- SYMBOL_PRINT_NAME (symbol));
+ symbol->print_name ());
default:
gdb_assert_not_reached ("bad debug_loc_kind");
}
data = dwarf2_find_location_expression (dlbaton, &size, pc);
if (size == 0)
- error (_("symbol \"%s\" is optimized out"), SYMBOL_NATURAL_NAME (sym));
+ error (_("symbol \"%s\" is optimized out"), sym->natural_name ());
compile_dwarf_expr_to_c (stream, result_name,
sym, pc, gdbarch, registers_used, addr_size,
information (but NAME might contain it). */
if (sym != NULL
- && strcmp_iw (SYMBOL_SEARCH_NAME (sym), name) == 0)
+ && strcmp_iw (sym->search_name (), name) == 0)
return stab;
if (with_opaque != NULL
- && strcmp_iw (SYMBOL_SEARCH_NAME (with_opaque), name) == 0)
+ && strcmp_iw (with_opaque->search_name (), name) == 0)
stab_best = stab;
/* Keep looking through other CUs. */
(struct symbol *) templ_func);
if (dwarf2_flag_true_p (die, DW_AT_main_subprogram, cu))
- set_objfile_main_name (objfile, SYMBOL_LINKAGE_NAME (newobj->name),
+ set_objfile_main_name (objfile, newobj->name->linkage_name (),
cu->language);
/* If there is a location expression for DW_AT_frame_base, record
* sizeof (struct field));
}
- FIELD_NAME (fields[num_fields]) = SYMBOL_LINKAGE_NAME (sym);
+ FIELD_NAME (fields[num_fields]) = sym->linkage_name ();
FIELD_TYPE (fields[num_fields]) = NULL;
SET_FIELD_ENUMVAL (fields[num_fields], SYMBOL_VALUE (sym));
FIELD_BITSIZE (fields[num_fields]) = 0;
apply. */
bound_minimal_symbol found
= (lookup_minimal_symbol_linkage
- (SYMBOL_LINKAGE_NAME (sym), objfile));
+ (sym->linkage_name (), objfile));
if (found.minsym != nullptr)
sym->maybe_copied = 1;
}
with this objfile, so we don't need to
duplicate it for the type. */
if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0)
- TYPE_NAME (SYMBOL_TYPE (sym)) = SYMBOL_SEARCH_NAME (sym);
+ TYPE_NAME (SYMBOL_TYPE (sym)) = sym->search_name ();
}
}
}
struct dwarf2_locexpr_baton *baton;
dwarf2_const_value_attr (attr, SYMBOL_TYPE (sym),
- SYMBOL_PRINT_NAME (sym),
+ sym->print_name (),
&objfile->objfile_obstack, cu,
&value, &bytes, &baton);
else
{
dwarf2_invalid_attrib_class_complaint ("location description",
- SYMBOL_NATURAL_NAME (sym));
+ sym->natural_name ());
baton->size = 0;
}
else if (op == OP_VAR_VALUE)
{
symbol *sym = exp->elts[*pos + 2].symbol;
- var_func_name = SYMBOL_PRINT_NAME (sym);
+ var_func_name = sym->print_name ();
}
argvec[0] = evaluate_subexp_with_coercion (exp, pos, noside);
(*pos) += 3;
symbol *var = exp->elts[pc + 2].symbol;
if (TYPE_CODE (SYMBOL_TYPE (var)) == TYPE_CODE_ERROR)
- error_unknown_type (SYMBOL_PRINT_NAME (var));
+ error_unknown_type (var->print_name ());
if (noside != EVAL_SKIP)
return evaluate_var_value (noside, exp->elts[pc + 1].block, var);
else
if (SYMBOL_COMPUTED_OPS (sym) == NULL
|| SYMBOL_COMPUTED_OPS (sym)->read_variable_at_entry == NULL)
error (_("Symbol \"%s\" does not have any specific entry value"),
- SYMBOL_PRINT_NAME (sym));
+ sym->print_name ());
frame = get_selected_frame (NULL);
return SYMBOL_COMPUTED_OPS (sym)->read_variable_at_entry (sym, frame);
b = exp->elts[pc + 1].block;
if (b != NULL
&& BLOCK_FUNCTION (b) != NULL
- && SYMBOL_PRINT_NAME (BLOCK_FUNCTION (b)) != NULL)
+ && BLOCK_FUNCTION (b)->print_name () != NULL)
{
- fputs_filtered (SYMBOL_PRINT_NAME (BLOCK_FUNCTION (b)), stream);
+ fputs_filtered (BLOCK_FUNCTION (b)->print_name (), stream);
fputs_filtered ("::", stream);
}
- fputs_filtered (SYMBOL_PRINT_NAME (exp->elts[pc + 2].symbol), stream);
+ fputs_filtered (exp->elts[pc + 2].symbol->print_name (), stream);
}
return;
{
(*pos) += 2;
fprintf_filtered (stream, "%s@entry",
- SYMBOL_PRINT_NAME (exp->elts[pc + 1].symbol));
+ exp->elts[pc + 1].symbol->print_name ());
}
return;
fprintf_filtered (stream, ", symbol @");
gdb_print_host_address (exp->elts[elt + 1].symbol, stream);
fprintf_filtered (stream, " (%s)",
- SYMBOL_PRINT_NAME (exp->elts[elt + 1].symbol));
+ exp->elts[elt + 1].symbol->print_name ());
elt += 3;
break;
case OP_VAR_MSYM_VALUE:
fprintf_filtered (stream, "Entry value of symbol @");
gdb_print_host_address (exp->elts[elt].symbol, stream);
fprintf_filtered (stream, " (%s)",
- SYMBOL_PRINT_NAME (exp->elts[elt].symbol));
+ exp->elts[elt].symbol->print_name ());
elt += 2;
break;
case OP_LAST:
gdb_assert (SYMBOL_CLASS (sym) == LOC_COMMON_BLOCK);
- if (comname && (!SYMBOL_LINKAGE_NAME (sym)
- || strcmp (comname, SYMBOL_LINKAGE_NAME (sym)) != 0))
+ if (comname && (!sym->linkage_name ()
+ || strcmp (comname, sym->linkage_name ()) != 0))
continue;
if (*any_printed)
putchar_filtered ('\n');
else
*any_printed = 1;
- if (SYMBOL_PRINT_NAME (sym))
+ if (sym->print_name ())
printf_filtered (_("Contents of F77 COMMON block '%s':\n"),
- SYMBOL_PRINT_NAME (sym));
+ sym->print_name ());
else
printf_filtered (_("Contents of blank COMMON block:\n"));
struct value *val = NULL;
printf_filtered ("%s = ",
- SYMBOL_PRINT_NAME (common->contents[index]));
+ common->contents[index]->print_name ());
try
{
{
if (BLOCK_FUNCTION (var_block)
&& !block_inlined_p (var_block)
- && SYMBOL_PRINT_NAME (BLOCK_FUNCTION (var_block)))
+ && BLOCK_FUNCTION (var_block)->print_name ())
error (_("No frame is currently executing in block %s."),
- SYMBOL_PRINT_NAME (BLOCK_FUNCTION (var_block)));
+ BLOCK_FUNCTION (var_block)->print_name ());
else
error (_("No frame is currently executing in specified"
" block"));
if (sym_need == SYMBOL_NEEDS_FRAME)
gdb_assert (frame != NULL);
else if (sym_need == SYMBOL_NEEDS_REGISTERS && !target_has_registers)
- error (_("Cannot read `%s' without registers"), SYMBOL_PRINT_NAME (var));
+ error (_("Cannot read `%s' without registers"), var->print_name ());
if (frame != NULL)
frame = get_hosting_frame (var, var_block, frame);
addr = get_frame_args_address (frame);
if (!addr)
error (_("Unknown argument list address for `%s'."),
- SYMBOL_PRINT_NAME (var));
+ var->print_name ());
addr += SYMBOL_VALUE (var);
break;
argref = get_frame_args_address (frame);
if (!argref)
error (_("Unknown argument list address for `%s'."),
- SYMBOL_PRINT_NAME (var));
+ var->print_name ());
argref += SYMBOL_VALUE (var);
ref = value_at (lookup_pointer_type (type), argref);
addr = value_as_address (ref);
case LOC_TYPEDEF:
error (_("Cannot look up value of a typedef `%s'."),
- SYMBOL_PRINT_NAME (var));
+ var->print_name ());
break;
case LOC_BLOCK:
if (regval == NULL)
error (_("Value of register variable not available for `%s'."),
- SYMBOL_PRINT_NAME (var));
+ var->print_name ());
addr = value_as_address (regval);
}
if (regval == NULL)
error (_("Value of register variable not available for `%s'."),
- SYMBOL_PRINT_NAME (var));
+ var->print_name ());
return regval;
}
}
struct obj_section *obj_section;
memset (&lookup_data, 0, sizeof (lookup_data));
- lookup_data.name = SYMBOL_LINKAGE_NAME (var);
+ lookup_data.name = var->linkage_name ();
gdbarch_iterate_over_objfiles_in_search_order
(symbol_arch (var),
can't be NULL. */
gdb_assert (flavour_name != NULL);
error (_("Missing %s symbol \"%s\"."),
- flavour_name, SYMBOL_LINKAGE_NAME (var));
+ flavour_name, var->linkage_name ());
}
obj_section = MSYMBOL_OBJ_SECTION (lookup_data.result.objfile, msym);
/* Relocate address, unless there is no section or the variable is
default:
error (_("Cannot look up value of a botched symbol `%s'."),
- SYMBOL_PRINT_NAME (var));
+ var->print_name ());
break;
}
char *
go_symbol_package_name (const struct symbol *sym)
{
- const char *mangled_name = SYMBOL_LINKAGE_NAME (sym);
+ const char *mangled_name = sym->linkage_name ();
const char *package_name;
const char *object_name;
const char *method_type_package_name;
gdbscm_printf (port, " static");
if (BLOCK_FUNCTION (b) != NULL)
- gdbscm_printf (port, " %s", SYMBOL_PRINT_NAME (BLOCK_FUNCTION (b)));
+ gdbscm_printf (port, " %s", BLOCK_FUNCTION (b)->print_name ());
gdbscm_printf (port, " %s-%s",
hex_string (BLOCK_START (b)), hex_string (BLOCK_END (b)));
gdbscm_printf (port, "#<%s ", symbol_smob_name);
gdbscm_printf (port, "%s",
s_smob->symbol != NULL
- ? SYMBOL_PRINT_NAME (s_smob->symbol)
+ ? s_smob->symbol->print_name ()
: "<invalid>");
if (pstate->writingp)
scm_puts (">", port);
= syscm_get_valid_symbol_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME);
const struct symbol *symbol = s_smob->symbol;
- return gdbscm_scm_from_c_string (SYMBOL_NATURAL_NAME (symbol));
+ return gdbscm_scm_from_c_string (symbol->natural_name ());
}
/* (symbol-linkage-name <gdb:symbol>) -> string */
= syscm_get_valid_symbol_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME);
const struct symbol *symbol = s_smob->symbol;
- return gdbscm_scm_from_c_string (SYMBOL_LINKAGE_NAME (symbol));
+ return gdbscm_scm_from_c_string (symbol->linkage_name ());
}
/* (symbol-print-name <gdb:symbol>) -> string */
= syscm_get_valid_symbol_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME);
const struct symbol *symbol = s_smob->symbol;
- return gdbscm_scm_from_c_string (SYMBOL_PRINT_NAME (symbol));
+ return gdbscm_scm_from_c_string (symbol->print_name ());
}
/* (symbol-addr-class <gdb:symbol>) -> integer */
struct symbol *symbol = find_pc_function (funaddr);
if (symbol)
- return SYMBOL_PRINT_NAME (symbol);
+ return symbol->print_name ();
}
{
if (fn != NULL && sfn != fn)
{
if (!query (_("Line %d is not in `%s'. Jump anyway? "), sal.line,
- SYMBOL_PRINT_NAME (fn)))
+ fn->print_name ()))
{
error (_("Not confirmed."));
/* NOTREACHED */
if (sm->function != NULL && TYPE_NO_RETURN (sm->function->type)
&& !query (_("warning: Function %s does not return normally.\n"
"Try to finish anyway? "),
- SYMBOL_PRINT_NAME (sm->function)))
+ sm->function->print_name ()))
error (_("Not confirmed."));
printf_filtered (_("Run till exit from "));
}
CORE_ADDR handler;
struct breakpoint *bp;
- vsym = lookup_symbol_search_name (SYMBOL_SEARCH_NAME (sym),
+ vsym = lookup_symbol_search_name (sym->search_name (),
b, VAR_DOMAIN);
value = read_var_value (vsym.symbol, vsym.block, frame);
/* If the value was optimized out, revert to the old behavior. */
gdb_assert (!ls->labels.function_symbols->empty ()
&& (ls->labels.function_symbols->size () == 1));
block_symbol s = ls->labels.function_symbols->front ();
- explicit_loc->function_name
- = xstrdup (SYMBOL_NATURAL_NAME (s.symbol));
+ explicit_loc->function_name = xstrdup (s.symbol->natural_name ());
}
}
skip_prologue_sal (&intermediate_results[i]);
intermediate_results[i].symbol = sym;
add_sal_to_sals (self, &values, &intermediate_results[i],
- sym ? SYMBOL_NATURAL_NAME (sym) : NULL, 0);
+ sym ? sym->natural_name () : NULL, 0);
}
}
if (symbol_to_sal (&sal, state->funfirstline, sym.symbol)
&& maybe_add_address (state->addr_set, pspace, sal.pc))
add_sal_to_sals (state, &sals, &sal,
- SYMBOL_NATURAL_NAME (sym.symbol), 0);
+ sym.symbol->natural_name (), 0);
}
}
else if (ls->function_symbols != NULL || ls->minimal_symbols != NULL)
if (symbol_to_sal (&sal, state->funfirstline, sym.symbol)
&& maybe_add_address (state->addr_set, pspace, sal.pc))
add_sal_to_sals (state, &sals, &sal,
- SYMBOL_NATURAL_NAME (sym.symbol), 0);
+ sym.symbol->natural_name (), 0);
}
}
}
{
for (const auto &label : *labels)
{
- char *match = xstrdup (SYMBOL_SEARCH_NAME (label.symbol));
+ char *match = xstrdup (label.symbol->search_name ());
tracker.add_completion (gdb::unique_xmalloc_ptr<char> (match));
}
delete labels;
{
if (symbol_matches_domain (SYMBOL_LANGUAGE (sym),
SYMBOL_DOMAIN (sym), LABEL_DOMAIN)
- && cmp (SYMBOL_SEARCH_NAME (sym), name, name_len) == 0)
+ && cmp (sym->search_name (), name, name_len) == 0)
{
result->push_back ({sym, block});
label_funcs_ret->push_back ({fn_sym, block});
fprintf_filtered (stream, "TYPE ");
if (!TYPE_NAME (SYMBOL_TYPE (new_symbol))
|| strcmp (TYPE_NAME ((SYMBOL_TYPE (new_symbol))),
- SYMBOL_LINKAGE_NAME (new_symbol)) != 0)
- fprintf_filtered (stream, "%s = ", SYMBOL_PRINT_NAME (new_symbol));
+ new_symbol->linkage_name ()) != 0)
+ fprintf_filtered (stream, "%s = ", new_symbol->print_name ());
else
fprintf_filtered (stream, "<builtin> = ");
type_print (type, "", stream, 0);
if (regno < 0 || regno >= gdbarch_num_cooked_regs (gdbarch))
{
reg_value_complaint (regno, gdbarch_num_cooked_regs (gdbarch),
- SYMBOL_PRINT_NAME (sym));
+ sym->print_name ());
regno = gdbarch_sp_regnum (gdbarch); /* Known safe, though useless. */
}
/* 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_LINKAGE_NAME (s));
+ int bucket = hashname (s->linkage_name ());
SYMBOL_VALUE_CHAIN (s) = global_sym_chain[bucket];
global_sym_chain[bucket] = s;
}
for anything except pointers or functions. */
}
else
- TYPE_NAME (SYMBOL_TYPE (s)) = SYMBOL_LINKAGE_NAME (s);
+ TYPE_NAME (SYMBOL_TYPE (s)) = s->linkage_name ();
}
break;
inc = name[0];
ALL_BLOCK_SYMBOLS (block, iter, sym)
{
- if (SYMBOL_LINKAGE_NAME (sym)[0] == inc
+ if (sym->linkage_name ()[0] == inc
&& SYMBOL_DOMAIN (sym) == domain
&& SYMBOL_CLASS (sym) == theclass
- && strcmp (SYMBOL_LINKAGE_NAME (sym), name) == 0)
+ && strcmp (sym->linkage_name (), name) == 0)
return sym;
}
string_file stb;
- stb.puts (SYMBOL_PRINT_NAME (arg->sym));
+ stb.puts (arg->sym->print_name ());
if (arg->entry_kind == print_entry_values_only)
stb.puts ("@entry");
uiout->field_stream ("name", stb);
struct frame_arg arg, entryarg;
if (SYMBOL_IS_ARGUMENT (sym))
- sym2 = lookup_symbol (SYMBOL_LINKAGE_NAME (sym),
+ sym2 = lookup_symbol (sym->linkage_name (),
block, VAR_DOMAIN,
NULL).symbol;
else
{
const char *aname, *bname;
- aname = SYMBOL_PRINT_NAME (*(struct symbol **) a);
- bname = SYMBOL_PRINT_NAME (*(struct symbol **) b);
+ aname = (*(struct symbol **) a)->print_name ();
+ bname = (*(struct symbol **) b)->print_name ();
if (aname == NULL || bname == NULL)
error (_("internal: compare_selectors(1)"));
char *p = asel;
QUIT;
- name = SYMBOL_NATURAL_NAME (sym_arr[ix]);
+ name = sym_arr[ix]->natural_name ();
name = strchr (name, ' ') + 1;
if (p[0] && specialcmp(name, p) == 0)
continue; /* Seen this one already (not unique). */
{
const char *aname, *bname;
- aname = SYMBOL_PRINT_NAME (*(struct symbol **) a);
- bname = SYMBOL_PRINT_NAME (*(struct symbol **) b);
+ aname = (*(struct symbol **) a)->print_name ();
+ bname = (*(struct symbol **) b)->print_name ();
if (aname == NULL || bname == NULL)
error (_("internal: compare_classes(1)"));
char *p = aclass;
QUIT;
- name = SYMBOL_NATURAL_NAME (sym_arr[ix]);
+ name = sym_arr[ix]->natural_name ();
name += 2;
if (p[0] && specialcmp(name, p) == 0)
continue; /* Seen this one already (not unique). */
0).symbol;
if (sym != NULL)
- symbol_names->push_back (SYMBOL_NATURAL_NAME (sym));
+ symbol_names->push_back (sym->natural_name ());
else
{
struct bound_minimal_symbol msym
{
type = check_typedef (type);
fprintf_filtered (stream, "type ");
- fprintf_filtered (stream, "%s = ", SYMBOL_PRINT_NAME (new_symbol));
+ fprintf_filtered (stream, "%s = ", new_symbol->print_name ());
type_print (type, "", stream, 0);
fprintf_filtered (stream, ";");
}
name_location = BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (symbol));
if (do_demangle || asm_demangle)
- name_temp = SYMBOL_PRINT_NAME (symbol);
+ name_temp = symbol->print_name ();
else
- name_temp = SYMBOL_LINKAGE_NAME (symbol);
+ name_temp = symbol->linkage_name ();
}
if (msymbol.minsym != NULL
}
printf_filtered ("Symbol \"");
- fprintf_symbol_filtered (gdb_stdout, SYMBOL_PRINT_NAME (sym),
+ fprintf_symbol_filtered (gdb_stdout, sym->print_name (),
current_language->la_language, DMGL_ANSI);
printf_filtered ("\" is ");
val = SYMBOL_VALUE (sym);
{
struct bound_minimal_symbol msym;
- msym = lookup_bound_minimal_symbol (SYMBOL_LINKAGE_NAME (sym));
+ msym = lookup_bound_minimal_symbol (sym->linkage_name ());
if (msym.minsym == NULL)
printf_filtered ("unresolved");
else
{
if (!name)
- name = SYMBOL_PRINT_NAME (var);
+ name = var->print_name ();
fprintf_filtered (stream, "%s%ps = ", n_spaces (2 * indent),
styled_string (variable_name_style.style (), name));
/* Duplicate the symbol name, so the caller has consistency
in garbage collection. */
- name->reset (xstrdup (SYMBOL_PRINT_NAME (*sym)));
+ name->reset (xstrdup ((*sym)->print_name ()));
/* If a symbol is specified attempt to determine the language
from the symbol. If mode is not "auto", then the language
{
string_file stb;
- fprintf_symbol_filtered (&stb, SYMBOL_PRINT_NAME (fa->sym),
+ fprintf_symbol_filtered (&stb, fa->sym->print_name (),
SYMBOL_LANGUAGE (fa->sym),
DMGL_PARAMS | DMGL_ANSI);
if (fa->entry_kind == print_entry_values_compact)
{
stb.puts ("=");
- fprintf_symbol_filtered (&stb, SYMBOL_PRINT_NAME (fa->sym),
+ fprintf_symbol_filtered (&stb, fa->sym->print_name (),
SYMBOL_LANGUAGE (fa->sym),
DMGL_PARAMS | DMGL_ANSI);
}
SYMPY_REQUIRE_VALID (self, symbol);
- result = PyString_FromString (SYMBOL_PRINT_NAME (symbol));
+ result = PyString_FromString (symbol->print_name ());
return result;
}
SYMPY_REQUIRE_VALID (self, symbol);
- return PyString_FromString (SYMBOL_NATURAL_NAME (symbol));
+ return PyString_FromString (symbol->natural_name ());
}
static PyObject *
SYMPY_REQUIRE_VALID (self, symbol);
- return PyString_FromString (SYMBOL_LINKAGE_NAME (symbol));
+ return PyString_FromString (symbol->linkage_name ());
}
static PyObject *
symbol_name = fullname;
symbol_name += ":";
- symbol_name += SYMBOL_LINKAGE_NAME (p.symbol);
+ symbol_name += p.symbol->linkage_name ();
}
else
symbol_name = p.msymbol.minsym->linkage_name ();
sym = bfun->sym;
if (sym != NULL)
- return SYMBOL_PRINT_NAME (sym);
+ return sym->print_name ();
else if (msym != NULL)
return msym->print_name ();
else
}
if (sym != NULL)
- uiout->field_string ("function", SYMBOL_PRINT_NAME (sym),
+ uiout->field_string ("function", sym->print_name (),
function_name_style.style ());
else if (msym != NULL)
uiout->field_string ("function", msym->print_name (),
struct ui_file *stream)
{
type = check_typedef (type);
- fprintf_filtered (stream, "type %s = ", SYMBOL_PRINT_NAME (new_symbol));
+ fprintf_filtered (stream, "type %s = ", new_symbol->print_name ());
type_print (type, "", stream, 0);
fprintf_filtered (stream, ";");
}
if (sym == 0)
name = 0;
else
- name = SYMBOL_LINKAGE_NAME (sym);
+ name = sym->linkage_name ();
/* Check the main executable. */
addr = find_canonical_descriptor_in_load_object
if (regno < 0 || regno >= gdbarch_num_cooked_regs (gdbarch))
{
reg_value_complaint (regno, gdbarch_num_cooked_regs (gdbarch),
- SYMBOL_PRINT_NAME (sym));
+ sym->print_name ());
regno = gdbarch_sp_regnum (gdbarch); /* Known safe, though useless. */
}
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_LINKAGE_NAME (sym) && SYMBOL_LINKAGE_NAME (sym)[0] != '#')
+ if (sym->linkage_name () && sym->linkage_name ()[0] != '#')
{
- i = hashname (SYMBOL_LINKAGE_NAME (sym));
+ i = hashname (sym->linkage_name ());
SYMBOL_VALUE_CHAIN (sym) = global_sym_chain[i];
global_sym_chain[i] = sym;
}
the same name to represent an argument passed in a
register. GCC uses 'P' for the same case. So if we find
such a symbol pair we combine it into one 'P' symbol.
- For Sun cc we need to do this regardless of
- stabs_argument_has_addr, because the compiler puts out
+ For Sun cc we need to do this regardless of stabs_argument_has_addr, because the compiler puts out
the 'p' symbol even if it never saves the argument onto
the stack.
prev_sym = local_symbols->symbol[local_symbols->nsyms - 1];
if ((SYMBOL_CLASS (prev_sym) == LOC_REF_ARG
|| SYMBOL_CLASS (prev_sym) == LOC_ARG)
- && strcmp (SYMBOL_LINKAGE_NAME (prev_sym),
- SYMBOL_LINKAGE_NAME (sym)) == 0)
+ && strcmp (prev_sym->linkage_name (),
+ sym->linkage_name ()) == 0)
{
SYMBOL_ACLASS_INDEX (prev_sym) = stab_register_index;
/* Use the type from the LOC_REGISTER; that is the type
SYMBOL_ACLASS_INDEX (sym) = LOC_STATIC;
SET_SYMBOL_VALUE_ADDRESS (sym, valu);
if (gdbarch_static_transform_name_p (gdbarch)
- && gdbarch_static_transform_name (gdbarch,
- SYMBOL_LINKAGE_NAME (sym))
- != SYMBOL_LINKAGE_NAME (sym))
+ && gdbarch_static_transform_name (gdbarch, sym->linkage_name ())
+ != sym->linkage_name ())
{
struct bound_minimal_symbol msym;
- msym = lookup_minimal_symbol (SYMBOL_LINKAGE_NAME (sym),
- NULL, objfile);
+ msym = lookup_minimal_symbol (sym->linkage_name (), NULL, objfile);
if (msym.minsym != NULL)
{
const char *new_name = gdbarch_static_transform_name
- (gdbarch, SYMBOL_LINKAGE_NAME (sym));
+ (gdbarch, sym->linkage_name ());
SYMBOL_SET_LINKAGE_NAME (sym, new_name);
SET_SYMBOL_VALUE_ADDRESS (sym,
if (TYPE_NAME (SYMBOL_TYPE (sym)) == NULL)
{
if ((TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_PTR
- && strcmp (SYMBOL_LINKAGE_NAME (sym), vtbl_ptr_name))
+ && strcmp (sym->linkage_name (), vtbl_ptr_name))
|| TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_FUNC)
{
/* If we are giving a name to a type such as "pointer to
/* Pascal accepts names for pointer types. */
if (get_current_subfile ()->language == language_pascal)
{
- TYPE_NAME (SYMBOL_TYPE (sym)) = SYMBOL_LINKAGE_NAME (sym);
+ TYPE_NAME (SYMBOL_TYPE (sym)) = sym->linkage_name ();
}
}
else
- TYPE_NAME (SYMBOL_TYPE (sym)) = SYMBOL_LINKAGE_NAME (sym);
+ TYPE_NAME (SYMBOL_TYPE (sym)) = sym->linkage_name ();
}
add_symbol_to_list (sym, get_file_symbols ());
SYMBOL_DOMAIN (struct_sym) = STRUCT_DOMAIN;
if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0)
TYPE_NAME (SYMBOL_TYPE (sym))
- = obconcat (&objfile->objfile_obstack,
- SYMBOL_LINKAGE_NAME (sym),
+ = obconcat (&objfile->objfile_obstack, sym->linkage_name (),
(char *) NULL);
add_symbol_to_list (struct_sym, get_file_symbols ());
}
SYMBOL_DOMAIN (sym) = STRUCT_DOMAIN;
if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0)
TYPE_NAME (SYMBOL_TYPE (sym))
- = obconcat (&objfile->objfile_obstack,
- SYMBOL_LINKAGE_NAME (sym),
+ = obconcat (&objfile->objfile_obstack, sym->linkage_name (),
(char *) NULL);
add_symbol_to_list (sym, get_file_symbols ());
SYMBOL_DOMAIN (typedef_sym) = VAR_DOMAIN;
if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0)
TYPE_NAME (SYMBOL_TYPE (sym))
- = obconcat (&objfile->objfile_obstack,
- SYMBOL_LINKAGE_NAME (sym),
+ = obconcat (&objfile->objfile_obstack, sym->linkage_name (),
(char *) NULL);
add_symbol_to_list (typedef_sym, get_file_symbols ());
}
SYMBOL_ACLASS_INDEX (sym) = LOC_STATIC;
SET_SYMBOL_VALUE_ADDRESS (sym, valu);
if (gdbarch_static_transform_name_p (gdbarch)
- && gdbarch_static_transform_name (gdbarch,
- SYMBOL_LINKAGE_NAME (sym))
- != SYMBOL_LINKAGE_NAME (sym))
+ && gdbarch_static_transform_name (gdbarch, sym->linkage_name ())
+ != sym->linkage_name ())
{
struct bound_minimal_symbol msym;
- msym = lookup_minimal_symbol (SYMBOL_LINKAGE_NAME (sym),
- NULL, objfile);
+ msym = lookup_minimal_symbol (sym->linkage_name (), NULL, objfile);
if (msym.minsym != NULL)
{
const char *new_name = gdbarch_static_transform_name
- (gdbarch, SYMBOL_LINKAGE_NAME (sym));
+ (gdbarch, sym->linkage_name ());
SYMBOL_SET_LINKAGE_NAME (sym, new_name);
SET_SYMBOL_VALUE_ADDRESS (sym, BMSYMBOL_VALUE_ADDRESS (msym));
if (SYMBOL_CLASS (sym) == LOC_TYPEDEF
&& SYMBOL_DOMAIN (sym) == STRUCT_DOMAIN
&& (TYPE_CODE (SYMBOL_TYPE (sym)) == code)
- && strcmp (SYMBOL_LINKAGE_NAME (sym), type_name) == 0)
+ && strcmp (sym->linkage_name (), type_name) == 0)
{
obstack_free (&objfile->objfile_obstack, type_name);
type = SYMBOL_TYPE (sym);
struct symbol *xsym = syms->symbol[j];
SYMBOL_TYPE (xsym) = type;
- TYPE_FIELD_NAME (type, n) = SYMBOL_LINKAGE_NAME (xsym);
+ TYPE_FIELD_NAME (type, n) = xsym->linkage_name ();
SET_FIELD_ENUMVAL (TYPE_FIELD (type, n), SYMBOL_VALUE (xsym));
TYPE_FIELD_BITSIZE (type, n) = 0;
}
/* Should we be putting local_symbols back to what it was?
Does it matter? */
- i = hashname (SYMBOL_LINKAGE_NAME (sym));
+ i = hashname (sym->linkage_name ());
SYMBOL_VALUE_CHAIN (sym) = global_sym_chain[i];
global_sym_chain[i] = sym;
common_block_name = NULL;
TYPE_CODE (*type))
&& (TYPE_INSTANCE_FLAGS (*type) ==
TYPE_INSTANCE_FLAGS (SYMBOL_TYPE (sym)))
- && strcmp (SYMBOL_LINKAGE_NAME (sym),
- type_name) == 0)
+ && strcmp (sym->linkage_name (), type_name) == 0)
replace_type (*type, SYMBOL_TYPE (sym));
}
}
for (sym = global_sym_chain[hash]; sym;)
{
- if (strcmp (msymbol->linkage_name (),
- SYMBOL_LINKAGE_NAME (sym)) == 0)
+ if (strcmp (msymbol->linkage_name (), sym->linkage_name ()) == 0)
{
/* Splice this symbol out of the hash chain and
assign the value we have to it. */
else
complaint (_("%s: common block `%s' from "
"global_sym_chain unresolved"),
- objfile_name (objfile), SYMBOL_PRINT_NAME (prev));
+ objfile_name (objfile), prev->print_name ());
}
}
memset (global_sym_chain, 0, sizeof (global_sym_chain));
annotate_arg_emitter arg_emitter;
ui_out_emit_tuple tuple_emitter (uiout, NULL);
- fprintf_symbol_filtered (&stb, SYMBOL_PRINT_NAME (arg->sym),
+ fprintf_symbol_filtered (&stb, arg->sym->print_name (),
SYMBOL_LANGUAGE (arg->sym), DMGL_PARAMS | DMGL_ANSI);
if (arg->entry_kind == print_entry_values_compact)
{
PRINT_ENTRY_VALUE_COMPACT we never use MI. */
stb.puts ("=");
- fprintf_symbol_filtered (&stb, SYMBOL_PRINT_NAME (arg->sym),
+ fprintf_symbol_filtered (&stb, arg->sym->print_name (),
SYMBOL_LANGUAGE (arg->sym),
DMGL_PARAMS | DMGL_ANSI);
}
parameter names occur on the RS/6000, for traceback
tables. FIXME, should we even print them? */
- if (*SYMBOL_LINKAGE_NAME (sym))
+ if (*sym->linkage_name ())
{
struct symbol *nsym;
- nsym = lookup_symbol_search_name (SYMBOL_SEARCH_NAME (sym),
+ nsym = lookup_symbol_search_name (sym->search_name (),
b, VAR_DOMAIN).symbol;
gdb_assert (nsym != NULL);
if (SYMBOL_CLASS (nsym) == LOC_REGISTER
func = get_frame_function (frame);
if (func)
{
- const char *print_name = SYMBOL_PRINT_NAME (func);
+ const char *print_name = func->print_name ();
*funlang = SYMBOL_LANGUAGE (func);
if (funcp)
*funcp = func;
if (*funlang == language_cplus)
{
- /* It seems appropriate to use SYMBOL_PRINT_NAME() here,
+ /* It seems appropriate to use print_name() here,
to display the demangled name that we already have
stored in the symbol table, but we stored a version
with DMGL_PARAMS turned on, and here we don't want to
gdb::unique_xmalloc_ptr<char> func_only;
if (func)
{
- funname = SYMBOL_PRINT_NAME (func);
+ funname = func->print_name ();
funlang = SYMBOL_LANGUAGE (func);
if (funlang == language_cplus)
{
- /* It seems appropriate to use SYMBOL_PRINT_NAME() here,
+ /* It seems appropriate to use print_name() here,
to display the demangled name that we already have
stored in the symbol table, but we stored a version
with DMGL_PARAMS turned on, and here we don't want to
break;
if (SYMBOL_DOMAIN (sym) == COMMON_BLOCK_DOMAIN)
break;
- (*cb) (SYMBOL_PRINT_NAME (sym), sym, cb_data);
+ (*cb) (sym->print_name (), sym, cb_data);
break;
default:
ALL_BLOCK_SYMBOLS (b, iter, sym)
{
- if (strcmp (SYMBOL_LINKAGE_NAME (sym), "default") == 0)
+ if (strcmp (sym->linkage_name (), "default") == 0)
{
if (*have_default)
continue;
sal = find_pc_line (SYMBOL_VALUE_ADDRESS (sym), 0);
values_printed = 1;
- fputs_filtered (SYMBOL_PRINT_NAME (sym), stream);
+ fputs_filtered (sym->print_name (), stream);
get_user_print_options (&opts);
if (opts.addressprint)
{
struct frame_info *frame;
if (p->preg.has_value ()
- && p->preg->exec (SYMBOL_NATURAL_NAME (sym), 0,
- NULL, 0) != 0)
+ && p->preg->exec (sym->natural_name (), 0, NULL, 0) != 0)
return;
if (p->treg.has_value ()
&& !treg_matches_sym_type_name (*p->treg, sym))
float). There are also LOC_ARG/LOC_REGISTER pairs which
are not combined in symbol-reading. */
- sym2 = lookup_symbol_search_name (SYMBOL_SEARCH_NAME (sym),
+ sym2 = lookup_symbol_search_name (sym->search_name (),
b, VAR_DOMAIN).symbol;
- (*cb) (SYMBOL_PRINT_NAME (sym), sym2, cb_data);
+ (*cb) (sym->print_name (), sym2, cb_data);
}
}
}
if (TYPE_NO_RETURN (thisfun->type))
warning (_("Function does not return normally to caller."));
confirmed = query (_("%sMake %s return now? "), query_prefix,
- SYMBOL_PRINT_NAME (thisfun));
+ thisfun->print_name ());
}
if (!confirmed)
error (_("Not confirmed"));
if (BLOCK_FUNCTION (b))
{
fprintf_filtered (outfile, ", function %s",
- SYMBOL_LINKAGE_NAME (BLOCK_FUNCTION (b)));
- if (SYMBOL_DEMANGLED_NAME (BLOCK_FUNCTION (b)) != NULL)
+ BLOCK_FUNCTION (b)->linkage_name ());
+ if (BLOCK_FUNCTION (b)->demangled_name () != NULL)
{
fprintf_filtered (outfile, ", %s",
- SYMBOL_DEMANGLED_NAME (BLOCK_FUNCTION (b)));
+ BLOCK_FUNCTION (b)->demangled_name ());
}
}
fprintf_filtered (outfile, "\n");
print_spaces (depth, outfile);
if (SYMBOL_DOMAIN (symbol) == LABEL_DOMAIN)
{
- fprintf_filtered (outfile, "label %s at ", SYMBOL_PRINT_NAME (symbol));
+ fprintf_filtered (outfile, "label %s at ", symbol->print_name ());
fputs_filtered (paddress (gdbarch, SYMBOL_VALUE_ADDRESS (symbol)),
outfile);
if (section)
? "enum"
: (TYPE_CODE (SYMBOL_TYPE (symbol)) == TYPE_CODE_STRUCT
? "struct" : "union")),
- SYMBOL_LINKAGE_NAME (symbol));
+ symbol->linkage_name ());
LA_PRINT_TYPE (SYMBOL_TYPE (symbol), "", outfile, 1, depth,
&type_print_raw_options);
}
if (SYMBOL_TYPE (symbol))
{
/* Print details of types, except for enums where it's clutter. */
- LA_PRINT_TYPE (SYMBOL_TYPE (symbol), SYMBOL_PRINT_NAME (symbol),
+ LA_PRINT_TYPE (SYMBOL_TYPE (symbol), symbol->print_name (),
outfile,
TYPE_CODE (SYMBOL_TYPE (symbol)) != TYPE_CODE_ENUM,
depth,
fprintf_filtered (outfile, "; ");
}
else
- fprintf_filtered (outfile, "%s ", SYMBOL_PRINT_NAME (symbol));
+ fprintf_filtered (outfile, "%s ", symbol->print_name ());
switch (SYMBOL_CLASS (symbol))
{
}
else
{
- slot_name = SYMBOL_SEARCH_NAME (slot->value.found.symbol);
+ slot_name = slot->value.found.symbol->search_name ();
slot_domain = SYMBOL_DOMAIN (slot->value.found.symbol);
}
/* It's important that we use the same comparison that was done
the first time through. If the slot records a found symbol,
then this means using the symbol name comparison function of
- the symbol's language with SYMBOL_SEARCH_NAME. See
+ the symbol's language with symbol->search_name (). See
dictionary.c. It also means using symbol_matches_domain for
found symbols. See block.c.
printf_filtered (" [%4u] = %s, %s %s\n", i,
host_address_to_string (context),
- SYMBOL_PRINT_NAME (found),
+ found->print_name (),
domain_name (SYMBOL_DOMAIN (found)));
break;
}
if (symbol_lookup_debug > 1)
{
fprintf_unfiltered (gdb_stdlog, " = %s (%s, block %s)\n",
- SYMBOL_PRINT_NAME (sym),
+ sym->print_name (),
host_address_to_string (sym),
host_address_to_string (block));
}
* 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_LINKAGE_NAME (msymbol)); */
+ msymbol->linkage_name ()); */
;
/* fall through */
else if (BMSYMBOL_VALUE_ADDRESS (mfunsym)
/* 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_LINKAGE_NAME (msymbol)); */
+ msymbol->linkage_name ()); */
;
/* fall through */
else
objfile = symbol_objfile (sym);
pc = BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (sym));
section = SYMBOL_OBJ_SECTION (objfile, sym);
- name = SYMBOL_LINKAGE_NAME (sym);
+ name = sym->linkage_name ();
}
else
{
if (sym_a.block != sym_b.block)
return sym_a.block - sym_b.block;
- return strcmp (SYMBOL_PRINT_NAME (sym_a.symbol),
- SYMBOL_PRINT_NAME (sym_b.symbol));
+ return strcmp (sym_a.symbol->print_name (), sym_b.symbol->print_name ());
}
/* Returns true if the type_name of symbol_type of SYM matches TREG.
{
fprintf_unfiltered (gdb_stdlog,
"treg_matches_sym_type_name\n sym %s\n",
- SYMBOL_NATURAL_NAME (sym));
+ sym->natural_name ());
}
sym_type = SYMBOL_TYPE (sym);
&& file_matches (symtab_to_fullname (real_symtab),
files, nfiles, 0)))
&& ((!preg.has_value ()
- || preg->exec (SYMBOL_NATURAL_NAME (sym), 0,
+ || preg->exec (sym->natural_name (), 0,
NULL, 0) == 0)
&& ((kind == VARIABLES_DOMAIN
&& SYMBOL_CLASS (sym) != LOC_TYPEDEF
{
type_print (SYMBOL_TYPE (sym),
(SYMBOL_CLASS (sym) == LOC_TYPEDEF
- ? "" : SYMBOL_PRINT_NAME (sym)),
+ ? "" : sym->print_name ()),
gdb_stdout, 0);
printf_filtered (";\n");
point we might want a language specific method to print the module
symbol so that we can customise the output more. */
else if (kind == MODULES_DOMAIN)
- printf_filtered ("%s\n", SYMBOL_PRINT_NAME (sym));
+ printf_filtered ("%s\n", sym->print_name ());
}
/* This help function for symtab_symbol_info() prints information
const char *fullname = symtab_to_fullname (symtab);
string = string_printf ("%s:'%s'", fullname,
- SYMBOL_LINKAGE_NAME (p.symbol));
+ p.symbol->linkage_name ());
break_command (&string[0], from_tty);
print_symbol_info (FUNCTIONS_DOMAIN, p.symbol, p.block, NULL);
}
const char *text, const char *word)
{
completion_list_add_name (tracker, SYMBOL_LANGUAGE (sym),
- SYMBOL_NATURAL_NAME (sym),
+ sym->natural_name (),
lookup_name, text, word);
}
if (SYMBOL_CLASS (sym) != LOC_BLOCK)
return {};
- lookup_name_info lookup_name (SYMBOL_SEARCH_NAME (sym),
+ lookup_name_info lookup_name (sym->search_name (),
symbol_name_match_type::SEARCH_NAME);
struct objfile *objfile = symbol_objfile (sym);
gdb_assert (sym->maybe_copied);
gdb_assert (SYMBOL_CLASS (sym) == LOC_STATIC);
- const char *linkage_name = SYMBOL_LINKAGE_NAME (sym);
+ const char *linkage_name = sym->linkage_name ();
for (objfile *objfile : current_program_space->objfiles ())
{
/* This is a module. */
gdb_assert (p.symbol != nullptr);
- std::string prefix = SYMBOL_PRINT_NAME (p.symbol);
+ std::string prefix = p.symbol->print_name ();
prefix += "::";
for (const symbol_search &q : symbols)
if (q.symbol == nullptr)
continue;
- if (strncmp (SYMBOL_PRINT_NAME (q.symbol), prefix.c_str (),
+ if (strncmp (q.symbol->print_name (), prefix.c_str (),
prefix.size ()) != 0)
continue;
if (last_module_symbol != p.symbol)
{
printf_filtered ("\n");
- printf_filtered (_("Module \"%s\":\n"),
- SYMBOL_PRINT_NAME (p.symbol));
+ printf_filtered (_("Module \"%s\":\n"), p.symbol->print_name ());
last_module_symbol = p.symbol;
last_filename = "";
}
/* Search name matching. This is like FULL, but the search name did
not come from the user; instead it is already a search name
- retrieved from a SYMBOL_SEARCH_NAME/search_name () call.
+ retrieved from a search_name () call.
For Ada, this avoids re-encoding an already-encoded search name
(which would potentially incorrectly lowercase letters in the
linkage/search name that should remain uppercase). For C++, it
gdb::string_view linkage_name, bool copy_name,
struct objfile_per_bfd_storage *per_bfd);
-/* 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. */
-
-#define SYMBOL_NATURAL_NAME(symbol) \
- ((symbol)->natural_name ())
-
-/* 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. */
-
-#define SYMBOL_LINKAGE_NAME(symbol) (symbol)->name
-
-#define SYMBOL_DEMANGLED_NAME(symbol) \
- ((symbol)->demangled_name ())
-
-/* Macro that returns a version of the name of a symbol that is
- suitable for output. In C++ this is the "demangled" form of the
- name if demangle is on and the "mangled" form of the name if
- demangle is off. In other languages this is just the symbol name.
- The result should never be NULL. Don't use this for internal
- purposes (e.g. storing in a hashtable): it's only suitable for output.
-
- N.B. symbol may be anything inheriting from general_symbol_info,
- e.g., struct symbol or struct minimal_symbol. */
-
-#define SYMBOL_PRINT_NAME(symbol) \
- (demangle ? SYMBOL_NATURAL_NAME (symbol) : SYMBOL_LINKAGE_NAME (symbol))
-
-#define SYMBOL_SEARCH_NAME(symbol) \
- ((symbol)->search_name ())
-
/* Return true if NAME matches the "search" name of SYMBOL, according
to the symbol's language. */
#define SYMBOL_MATCHES_SEARCH_NAME(symbol, name) \
DOMAIN, visible from lexical block BLOCK if non-NULL or from
global/static blocks if BLOCK is NULL. The passed-in search name
should not come from the user; instead it should already be a
- search name as retrieved from a
- SYMBOL_SEARCH_NAME/search_name () call. See definition of
+ search name as retrieved from a search_name () call. See definition of
symbol_name_match_type::SEARCH_NAME. Returns the struct symbol
pointer, or NULL if no symbol is found. The symbol's section is
fixed up if necessary. */
/* Save func name as "$trace_func", a debugger variable visible to
users. */
if (traceframe_fun == NULL
- || SYMBOL_LINKAGE_NAME (traceframe_fun) == NULL)
+ || traceframe_fun->linkage_name () == NULL)
clear_internalvar (lookup_internalvar ("trace_func"));
else
set_internalvar_string (lookup_internalvar ("trace_func"),
- SYMBOL_LINKAGE_NAME (traceframe_fun));
+ traceframe_fun->linkage_name ());
/* Save file name as "$trace_file", a debugger variable visible to
users. */
{
error (_("constant `%s' (value %s) "
"will not be collected."),
- SYMBOL_PRINT_NAME (exp->elts[2].symbol),
+ exp->elts[2].symbol->print_name (),
plongest (SYMBOL_VALUE (exp->elts[2].symbol)));
}
else if (SYMBOL_CLASS (exp->elts[2].symbol)
{
error (_("`%s' is optimized away "
"and cannot be collected."),
- SYMBOL_PRINT_NAME (exp->elts[2].symbol));
+ exp->elts[2].symbol->print_name ());
}
}
{
default:
printf_filtered ("%s: don't know symbol class %d\n",
- SYMBOL_PRINT_NAME (sym),
- SYMBOL_CLASS (sym));
+ sym->print_name (), SYMBOL_CLASS (sym));
break;
case LOC_CONST:
printf_filtered ("constant %s (value %s) will not be collected.\n",
- SYMBOL_PRINT_NAME (sym), plongest (SYMBOL_VALUE (sym)));
+ sym->print_name (), plongest (SYMBOL_VALUE (sym)));
break;
case LOC_STATIC:
offset = SYMBOL_VALUE_ADDRESS (sym);
if (info_verbose)
{
printf_filtered ("LOC_STATIC %s: collect %ld bytes at %s.\n",
- SYMBOL_PRINT_NAME (sym), len,
+ sym->print_name (), len,
paddress (gdbarch, offset));
}
/* A struct may be a C++ class with static fields, go to general
case LOC_REGISTER:
reg = SYMBOL_REGISTER_OPS (sym)->register_number (sym, gdbarch);
if (info_verbose)
- printf_filtered ("LOC_REG[parm] %s: ",
- SYMBOL_PRINT_NAME (sym));
+ printf_filtered ("LOC_REG[parm] %s: ", sym->print_name ());
add_local_register (gdbarch, reg, scope);
/* Check for doubles stored in two registers. */
/* FIXME: how about larger types stored in 3 or more regs? */
break;
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_PRINT_NAME (sym));
+ printf_filtered (" (will not collect %s)\n", sym->print_name ());
break;
case LOC_ARG:
reg = frame_regno;
if (info_verbose)
{
printf_filtered ("LOC_LOCAL %s: Collect %ld bytes at offset %s"
- " from frame ptr reg %d\n",
- SYMBOL_PRINT_NAME (sym), len,
+ " from frame ptr reg %d\n", sym->print_name (), len,
paddress (gdbarch, offset), reg);
}
add_memrange (gdbarch, reg, offset, len, scope);
if (info_verbose)
{
printf_filtered ("LOC_REGPARM_ADDR %s: Collect %ld bytes at offset %s"
- " from reg %d\n",
- SYMBOL_PRINT_NAME (sym), len,
+ " from reg %d\n", sym->print_name (), len,
paddress (gdbarch, offset), reg);
}
add_memrange (gdbarch, reg, offset, len, scope);
if (info_verbose)
{
printf_filtered ("LOC_LOCAL %s: Collect %ld bytes at offset %s"
- " from frame ptr reg %d\n",
- SYMBOL_PRINT_NAME (sym), len,
+ " from frame ptr reg %d\n", sym->print_name (), len,
paddress (gdbarch, offset), reg);
}
add_memrange (gdbarch, reg, offset, len, scope);
case LOC_OPTIMIZED_OUT:
printf_filtered ("%s has been optimized out of existence.\n",
- SYMBOL_PRINT_NAME (sym));
+ sym->print_name ());
break;
case LOC_COMPUTED:
if (!aexpr)
{
printf_filtered ("%s has been optimized out of existence.\n",
- SYMBOL_PRINT_NAME (sym));
+ sym->print_name ());
return;
}
case OP_VAR_VALUE:
{
struct symbol *sym = exp->elts[2].symbol;
- const char *name = SYMBOL_NATURAL_NAME (sym);
+ const char *name = sym->natural_name ();
collect->collect_symbol (exp->elts[2].symbol,
target_gdbarch (),
printf_filtered ("Scope for %s:\n", save_args);
count++;
- symname = SYMBOL_PRINT_NAME (sym);
+ symname = sym->print_name ();
if (symname == NULL || *symname == '\0')
continue; /* Probably botched, certainly useless. */
paddress (gdbarch, BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (sym))));
break;
case LOC_UNRESOLVED:
- msym = lookup_minimal_symbol (SYMBOL_LINKAGE_NAME (sym),
+ msym = lookup_minimal_symbol (sym->linkage_name (),
NULL, NULL);
if (msym.minsym == NULL)
printf_filtered ("Unresolved Static");
if (sym)
{
uiout->text ("in ");
- uiout->field_string ("func", SYMBOL_PRINT_NAME (sym),
+ uiout->field_string ("func", sym->print_name (),
function_name_style.style ());
uiout->wrap_hint (wrap_indent);
uiout->text (" at ");
continue;
tf = XOBNEW (&m_storage, struct decl_field);
- tf->name = SYMBOL_LINKAGE_NAME (TYPE_TEMPLATE_ARGUMENT (t, i));
+ tf->name = TYPE_TEMPLATE_ARGUMENT (t, i)->linkage_name ();
tf->type = SYMBOL_TYPE (TYPE_TEMPLATE_ARGUMENT (t, i));
slot = htab_find_slot (m_table, tf, INSERT);
error (_("Address requested for identifier "
"\"%s\" which is in register $%s"),
- SYMBOL_PRINT_NAME (var), regname);
+ var->print_name (), regname);
break;
}
default:
error (_("Can't take address of \"%s\" which isn't an lvalue."),
- SYMBOL_PRINT_NAME (var));
+ var->print_name ());
break;
}
if (fsym)
{
- qualified_name = SYMBOL_NATURAL_NAME (fsym);
+ qualified_name = fsym->natural_name ();
/* If we have a function with a C++ name, try to extract just
the function part. Do not try this for non-functions (e.g.
fprintf_filtered (gdb_stderr,
"Overloaded function instance "
"%s # of parms %d\n",
- SYMBOL_DEMANGLED_NAME (functions[ix]),
+ functions[ix]->demangled_name (),
(int) parm_types.size ());
for (jj = 0; jj < args.size () - static_offset; jj++)
fprintf_filtered (gdb_stderr,