2014-11-18 Doug Evans <xdje42@gmail.com>
+ * cp-namespace.c (cp_lookup_symbol_imports_or_template): Use
+ SYMBOL_OBJFILE.
+ * findvar.c (default_read_var_value): Ditto.
+ * jv-lang.c (add_class_symtab_symbol): Ditto.
+ * parse.c (operator_check_standard): Ditto.
+ * printcmd.c (address_info): Ditto.
+ * symtab.c (fixup_symbol_section): Ditto.
+ (skip_prologue_sal): Ditto.
+ * tracepoint.c (scope_info): Ditto.
+ * valops.c (find_function_in_inferior): Ditto.
+ * guile/scm-symbol.c (syscm_eq_symbol_smob): Ditto.
+ * python/py-symbol.c (set_symbol): Ditto.
+
+2014-11-18 Doug Evans <xdje42@gmail.com>
+
* buildsym.c (main_subfile): New static global.
(free_subfiles_list): New function.
(start_symtab): Set main_subfile.
struct cleanup *cleanups = make_cleanup (xfree, name_copy);
const struct language_defn *lang = language_def (language_cplus);
struct gdbarch *arch
- = get_objfile_arch (SYMBOL_SYMTAB (function)->objfile);
+ = get_objfile_arch (SYMBOL_OBJFILE (function));
const struct block *parent = BLOCK_SUPERBLOCK (block);
while (1)
lookup_data.name = SYMBOL_LINKAGE_NAME (var);
gdbarch_iterate_over_objfiles_in_search_order
- (get_objfile_arch (SYMBOL_SYMTAB (var)->objfile),
+ (get_objfile_arch (SYMBOL_OBJFILE (var)),
minsym_lookup_iterator_cb, &lookup_data,
- SYMBOL_SYMTAB (var)->objfile);
+ SYMBOL_OBJFILE (var));
msym = lookup_data.result.minsym;
if (msym == NULL)
static htab_t
syscm_objfile_symbol_map (struct symbol *symbol)
{
- struct objfile *objfile = SYMBOL_SYMTAB (symbol)->objfile;
+ struct objfile *objfile = SYMBOL_OBJFILE (symbol);
htab_t htab = objfile_data (objfile, syscm_objfile_data_key);
if (htab == NULL)
add_class_symtab_symbol (struct symbol *sym)
{
struct symtab *symtab
- = get_java_class_symtab (get_objfile_arch (SYMBOL_SYMTAB (sym)->objfile));
+ = get_java_class_symtab (get_objfile_arch (SYMBOL_OBJFILE (sym)));
const struct blockvector *bv = BLOCKVECTOR (symtab);
dict_add_symbol (BLOCK_DICT (BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK)), sym);
/* Check objfile where the variable itself is placed.
SYMBOL_OBJ_SECTION (symbol) may be NULL. */
- if ((*objfile_func) (SYMBOL_SYMTAB (symbol)->objfile, data))
+ if ((*objfile_func) (SYMBOL_OBJFILE (symbol), data))
return 1;
/* Check objfile where is placed the code touching the variable. */
printf_filtered ("\" is ");
val = SYMBOL_VALUE (sym);
section = SYMBOL_OBJ_SECTION (SYMBOL_OBJFILE (sym), sym);
- gdbarch = get_objfile_arch (SYMBOL_SYMTAB (sym)->objfile);
+ gdbarch = get_objfile_arch (SYMBOL_OBJFILE (sym));
if (SYMBOL_COMPUTED_OPS (sym) != NULL)
{
obj->prev = NULL;
if (SYMBOL_SYMTAB (symbol))
{
- obj->next = objfile_data (SYMBOL_SYMTAB (symbol)->objfile,
+ obj->next = objfile_data (SYMBOL_OBJFILE (symbol),
sympy_objfile_data_key);
if (obj->next)
obj->next->prev = obj;
- set_objfile_data (SYMBOL_SYMTAB (symbol)->objfile,
+ set_objfile_data (SYMBOL_OBJFILE (symbol),
sympy_objfile_data_key, obj);
}
else
sym_obj->prev->next = sym_obj->next;
else if (sym_obj->symbol && SYMBOL_SYMTAB (sym_obj->symbol))
{
- set_objfile_data (SYMBOL_SYMTAB (sym_obj->symbol)->objfile,
+ set_objfile_data (SYMBOL_OBJFILE (sym_obj->symbol),
sympy_objfile_data_key, sym_obj->next);
}
if (sym_obj->next)
gdb_assert (objfile || SYMBOL_SYMTAB (sym));
if (objfile == NULL)
- objfile = SYMBOL_SYMTAB (sym)->objfile;
+ objfile = SYMBOL_OBJFILE (sym);
if (SYMBOL_OBJ_SECTION (objfile, sym))
return sym;
pc = BLOCK_START (SYMBOL_BLOCK_VALUE (sym));
section = SYMBOL_OBJ_SECTION (SYMBOL_OBJFILE (sym), sym);
name = SYMBOL_LINKAGE_NAME (sym);
- objfile = SYMBOL_SYMTAB (sym)->objfile;
+ objfile = SYMBOL_OBJFILE (sym);
}
else
{
if (symname == NULL || *symname == '\0')
continue; /* Probably botched, certainly useless. */
- gdbarch = get_objfile_arch (SYMBOL_SYMTAB (sym)->objfile);
+ gdbarch = get_objfile_arch (SYMBOL_OBJFILE (sym));
printf_filtered ("Symbol %s is ", symname);
}
if (objf_p)
- *objf_p = SYMBOL_SYMTAB (sym)->objfile;
+ *objf_p = SYMBOL_OBJFILE (sym);
return value_of_variable (sym, NULL);
}