gdb: add type::fields / type::set_fields
[deliverable/binutils-gdb.git] / gdb / mdebugread.c
index f634dbb08f18060ab4d55072b6e1012a79f71f3d..aeecb14f19e02ded117389e02617306847a7cdae 100644 (file)
@@ -1018,9 +1018,8 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
        t->set_code (type_code);
        TYPE_LENGTH (t) = sh->value;
        t->set_num_fields (nfields);
-       TYPE_FIELDS (t) = f = ((struct field *)
-                              TYPE_ALLOC (t,
-                                          nfields * sizeof (struct field)));
+       f = ((struct field *) TYPE_ALLOC (t, nfields * sizeof (struct field)));
+       t->set_fields (f);
 
        if (type_code == TYPE_CODE_ENUM)
          {
@@ -1187,8 +1186,9 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
                  struct block_iterator iter;
 
                  ftype->set_num_fields (nparams);
-                 TYPE_FIELDS (ftype) = (struct field *)
-                   TYPE_ALLOC (ftype, nparams * sizeof (struct field));
+                 ftype->set_fields
+                   ((struct field *)
+                    TYPE_ALLOC (ftype, nparams * sizeof (struct field)));
 
                  iparams = 0;
                  ALL_BLOCK_SYMBOLS (cblock, iter, sym)
This page took 0.026024 seconds and 4 git commands to generate.