Add multibyte character warning option to the assembler.
[binutils-gdb.git] / gdb / coffread.c
index badcb5a608483f9cc5e5be58a53da3d3114cff2d..4723662f14088d80a313e85cb12c6032f0303123 100644 (file)
@@ -968,25 +968,25 @@ coff_symtab_read (minimal_symbol_reader &reader,
                   symbol lookup which returned no match.  */
                break;
              }
-           else if (cs->c_secnum == N_ABS)
-             {
-               /* Use the correct minimal symbol type (and don't
-                  relocate) for absolute values.  */
-               ms_type = mst_abs;
-               sec = cs_to_section (cs, objfile);
-               tmpaddr = cs->c_value;
-             }
+           else if (cs->c_secnum == N_ABS)
+             {
+               /* Use the correct minimal symbol type (and don't
+                  relocate) for absolute values.  */
+               ms_type = mst_abs;
+               sec = cs_to_section (cs, objfile);
+               tmpaddr = cs->c_value;
+             }
            else
              {
                asection *bfd_section = cs_to_bfd_section (cs, objfile);
 
                sec = cs_to_section (cs, objfile);
                tmpaddr = cs->c_value;
-               /* Statics in a PE file also get relocated.  */
-               if (cs->c_sclass == C_EXT
-                   || cs->c_sclass == C_THUMBEXTFUNC
-                   || cs->c_sclass == C_THUMBEXT
-                   || (pe_file && (cs->c_sclass == C_STAT)))
+               /* Statics in a PE file also get relocated.  */
+               if (cs->c_sclass == C_EXT
+                   || cs->c_sclass == C_THUMBEXTFUNC
+                   || cs->c_sclass == C_THUMBEXT
+                   || (pe_file && (cs->c_sclass == C_STAT)))
                  offset = objfile->section_offsets[sec];
 
                if (bfd_section->flags & SEC_CODE)
@@ -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;
@@ -2168,7 +2170,6 @@ static const struct sym_fns coff_sym_fns =
                                   for sym_read() */
   coff_symfile_read,           /* sym_read: read a symbol file into
                                   symtab */
-  NULL,                                /* sym_read_psymbols */
   coff_symfile_finish,         /* sym_finish: finished with file,
                                   cleanup */
   default_symfile_offsets,     /* sym_offsets: xlate external to
@@ -2180,7 +2181,6 @@ static const struct sym_fns coff_sym_fns =
   default_symfile_relocate,    /* sym_relocate: Relocate a debug
                                   section.  */
   NULL,                                /* sym_probe_fns */
-  &psym_functions
 };
 
 void _initialize_coffread ();