/* Support routines for decoding "stabs" debugging information format.
- Copyright (C) 1986-2019 Free Software Foundation, Inc.
+ Copyright (C) 1986-2020 Free Software Foundation, Inc.
This file is part of GDB.
SYMBOL_LINE (sym) = 0; /* unknown */
}
- SYMBOL_SET_LANGUAGE (sym, get_current_subfile ()->language,
- &objfile->objfile_obstack);
+ sym->set_language (get_current_subfile ()->language,
+ &objfile->objfile_obstack);
if (is_cplus_marker (string[0]))
{
normal:
std::string new_name;
- if (SYMBOL_LANGUAGE (sym) == language_cplus)
+ if (sym->language () == language_cplus)
{
char *name = (char *) alloca (p - string + 1);
new_name = cp_canonicalize_string (name);
}
if (!new_name.empty ())
- {
- SYMBOL_SET_NAMES (sym,
- new_name,
- 1, objfile);
- }
+ sym->compute_and_set_names (new_name, true, objfile->per_bfd);
else
- SYMBOL_SET_NAMES (sym, gdb::string_view (string, p - string), true,
- objfile);
+ sym->compute_and_set_names (gdb::string_view (string, p - string), true,
+ objfile->per_bfd);
- if (SYMBOL_LANGUAGE (sym) == language_cplus)
+ if (sym->language () == language_cplus)
cp_scan_for_anonymous_namespaces (get_buildsym_compunit (), sym,
objfile);
This is important to do, because of forward references:
The cleanup of undefined types stored in undef_types only uses
STRUCT_DOMAIN symbols to perform the replacement. */
- synonym = (SYMBOL_LANGUAGE (sym) == language_ada && p[-2] != 'T');
+ synonym = (sym->language () == language_ada && p[-2] != 'T');
/* Typedef */
SYMBOL_TYPE (sym) = read_type (&p, objfile);
sym = allocate_symbol (objfile);
sym->set_linkage_name (name);
- SYMBOL_SET_LANGUAGE (sym, get_current_subfile ()->language,
- &objfile->objfile_obstack);
+ sym->set_language (get_current_subfile ()->language,
+ &objfile->objfile_obstack);
SYMBOL_ACLASS_INDEX (sym) = LOC_CONST;
SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
SYMBOL_VALUE (sym) = n;
int
hashname (const char *name)
{
- return hash (name, strlen (name)) % HASHSIZE;
+ return fast_hash (name, strlen (name)) % HASHSIZE;
}
/* Initializer for this module. */