+/* Common code for symbols describing data. */
+
+static void
+add_data_symbol (SYMR *sh, union aux_ext *ax, int bigend,
+ struct symbol *s, int aclass_index, struct block *b,
+ struct objfile *objfile, const char *name)
+{
+ SYMBOL_DOMAIN (s) = VAR_DOMAIN;
+ SYMBOL_ACLASS_INDEX (s) = aclass_index;
+ add_symbol (s, top_stack->cur_st, b);
+
+ /* Type could be missing if file is compiled without debugging info. */
+ if (SC_IS_UNDEF (sh->sc)
+ || sh->sc == scNil || sh->index == indexNil)
+ SYMBOL_TYPE (s) = objfile_type (objfile)->nodebug_data_symbol;
+ else
+ SYMBOL_TYPE (s) = parse_type (cur_fd, ax, sh->index, 0, bigend, name);
+ /* Value of a data symbol is its memory address. */
+}
+