Add multibyte character warning option to the assembler.
[binutils-gdb.git] / gdb / coffread.c
index 0135363bc5a5d98d29bb84f4435d7a3fdc7a2383..4723662f14088d80a313e85cb12c6032f0303123 100644 (file)
@@ -1340,15 +1340,15 @@ coff_getfilename (union internal_auxent *aux_entry)
   static char buffer[BUFSIZ];
   const char *result;
 
-  if (aux_entry->x_file.x_n.x_zeroes == 0)
+  if (aux_entry->x_file.x_n.x_n.x_zeroes == 0)
     {
-      if (strlen (stringtab + aux_entry->x_file.x_n.x_offset) >= BUFSIZ)
+      if (strlen (stringtab + aux_entry->x_file.x_n.x_n.x_offset) >= BUFSIZ)
        internal_error (__FILE__, __LINE__, _("coff file name too long"));
-      strcpy (buffer, stringtab + aux_entry->x_file.x_n.x_offset);
+      strcpy (buffer, stringtab + aux_entry->x_file.x_n.x_n.x_offset);
     }
   else
     {
-      strncpy (buffer, aux_entry->x_file.x_fname, FILNMLEN);
+      strncpy (buffer, aux_entry->x_file.x_n.x_fname, FILNMLEN);
       buffer[FILNMLEN] = '\0';
     }
   result = buffer;
@@ -2008,10 +2008,11 @@ coff_read_struct_type (int index, int length, int lastsym,
          list = newobj;
 
          /* Save the data.  */
-         list->field.name = obstack_strdup (&objfile->objfile_obstack, name);
+         list->field.set_name (obstack_strdup (&objfile->objfile_obstack,
+                                               name));
          list->field.set_type (decode_type (ms, ms->c_type, &sub_aux,
                                             objfile));
-         SET_FIELD_BITPOS (list->field, 8 * ms->c_value);
+         list->field.set_loc_bitpos (8 * ms->c_value);
          FIELD_BITSIZE (list->field) = 0;
          nfields++;
          break;
@@ -2024,10 +2025,11 @@ coff_read_struct_type (int index, int length, int lastsym,
          list = newobj;
 
          /* Save the data.  */
-         list->field.name = obstack_strdup (&objfile->objfile_obstack, name);
+         list->field.set_name (obstack_strdup (&objfile->objfile_obstack,
+                                               name));
          list->field.set_type (decode_type (ms, ms->c_type, &sub_aux,
                                             objfile));
-         SET_FIELD_BITPOS (list->field, ms->c_value);
+         list->field.set_loc_bitpos (ms->c_value);
          FIELD_BITSIZE (list->field) = sub_aux.x_sym.x_misc.x_lnsz.x_size;
          nfields++;
          break;
@@ -2142,8 +2144,8 @@ coff_read_enum_type (int index, int length, int lastsym,
          struct symbol *xsym = syms->symbol[j];
 
          SYMBOL_TYPE (xsym) = type;
-         TYPE_FIELD_NAME (type, n) = xsym->linkage_name ();
-         SET_FIELD_ENUMVAL (type->field (n), SYMBOL_VALUE (xsym));
+         type->field (n).set_name (xsym->linkage_name ());
+         type->field (n).set_loc_enumval (SYMBOL_VALUE (xsym));
          if (SYMBOL_VALUE (xsym) < 0)
            unsigned_enum = 0;
          TYPE_FIELD_BITSIZE (type, n) = 0;