+Tue Feb 4 18:05:44 1992 Per Bothner (bothner at cygnus.com)
+
+ * mipsread.c: Use (FP0_REGNUM-32) instead of magic number 6.
+ (This is just for clarity - and one day permitting us to
+ change FP0_REGNUM from 38 to 32, which would make more sense.)
+ * tm-mips.h: Added STAB_REG_TO_REGNUM macro, so that
+ register numbers in stabs-in-ecoff get handled correctly.
+
+Sat Feb 1 04:45:10 1992 Stu Grossman (grossman at cygnus.com)
+
+ * xm-vax.h, xm-vaxult.h, xm-vaxbsd.h, config/mh-vaxult,
+ config/mh-vaxbsd, configure.in: Split up config stuff for Vaxen
+ into BSD and Ultrix.
+
Sat Feb 1 04:39:41 1992 John Gilmore (gnu at cygnus.com)
* dbxread.c (dbx_symfile_init): Call malloc, not xmalloc.
numargs_list = 0;
}
+char*
+prepend_tag_kind(tag_name, type_code)
+ char *tag_name;
+ int type_code;
+{
+ char *prefix;
+ char *result;
+ switch (type_code) {
+ case TYPE_CODE_ENUM:
+ prefix = "enum ";
+ break;
+ case TYPE_CODE_STRUCT:
+ prefix = "struct ";
+ break;
+ case TYPE_CODE_UNION:
+ prefix = "union ";
+ break;
+ default:
+ prefix = "";
+ }
+
+ result = (char*)obstack_alloc (symbol_obstack,
+ strlen(prefix) + strlen(tag_name) + 1);
+ sprintf(result, "%s%s", prefix, tag_name);
+ return result;
+}
+
\f
/* Parsing Routines proper. */
if (sh->sc == scRegister) {
class = LOC_REGISTER;
if (sh->value > 31)
- sh->value += 6;
+ sh->value += FP0_REGNUM-32;
} else
class = LOC_LOCAL;
b = top_stack->cur_block;
if (sh->sc == scRegister) {
SYMBOL_CLASS(s) = LOC_REGPARM;
if (sh->value > 31)
- sh->value += 6;
+ sh->value += FP0_REGNUM-32;
} else
SYMBOL_CLASS(s) = LOC_ARG;
SYMBOL_VALUE(s) = sh->value;
SYMBOL_CLASS(s) = LOC_TYPEDEF;
SYMBOL_VALUE(s) = 0;
add_symbol(s, top_stack->cur_block);
- /* If this type was expected, use its partial definition */
- if (pend)
- t = is_pending_symbol(cur_fdr, sh)->t;
- else
- t = new_type(sh->iss);
/* First count the number of fields. */
for (tsym = sh+1; tsym->st != stEnd; tsym++)
if (tsym->st == stMember) {
if (nfields == 0 && type_code == TYPE_CODE_UNDEF)
- /* If the type of the member is Void,
+ /* If the type of the member is Nil (or Void)
assume the tag is an enumeration. */
if (tsym->index == indexNil
+ || ax[tsym->index].ti.bt == btNil
|| ax[tsym->index].ti.bt == btVoid)
type_code = TYPE_CODE_ENUM;
nfields++;
if (max_value == 0) type_code = TYPE_CODE_UNION;
else type_code = TYPE_CODE_STRUCT;
+ /* If this type was expected, use its partial definition */
+ if (pend)
+ t = is_pending_symbol(cur_fdr, sh)->t;
+ else
+ t = new_type(prepend_tag_kind(sh->iss, type_code));
+
TYPE_CODE(t) = type_code;
TYPE_NFIELDS(t) = nfields;
TYPE_FIELDS(t) = f = (struct field*)
complain (&bad_tag_guess_complaint, 0);
TYPE_CODE(tp) = type_code;
}
- TYPE_NAME(tp) = obsavestring(pn, strlen(pn));
+ if (TYPE_NAME(tp) == NULL || strcmp(TYPE_NAME(tp), name) != 0)
+ TYPE_NAME(tp) = obsavestring(name, strlen(name));
}
/* Deal with range types */