* rs6000-tdep.c (rs6000_builtin_type_vec128): Add v2_double
[deliverable/binutils-gdb.git] / gdb / coffread.c
index 201cfa26f2e7bfd66075ec8f2fc43482b7791ba9..888f8b4be5afcfce3fd26d700b048462b83330e3 100644 (file)
@@ -1024,7 +1024,8 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
                 for which we do not have any other statement-line-number. */
              if (fcn_last_line == 1)
                record_line (current_subfile, fcn_first_line,
-                            fcn_first_line_addr);
+                            gdbarch_addr_bits_remove (gdbarch,
+                                                      fcn_first_line_addr));
              else
                enter_linenos (fcn_line_ptr, fcn_first_line, fcn_last_line,
                               objfile);
@@ -1350,6 +1351,7 @@ static void
 enter_linenos (long file_offset, int first_line,
               int last_line, struct objfile *objfile)
 {
+  struct gdbarch *gdbarch = get_objfile_arch (objfile);
   char *rawptr;
   struct internal_lineno lptr;
 
@@ -1382,9 +1384,12 @@ enter_linenos (long file_offset, int first_line,
       /* The next function, or the sentinel, will have L_LNNO32 zero;
         we exit. */
       if (L_LNNO32 (&lptr) && L_LNNO32 (&lptr) <= last_line)
-       record_line (current_subfile, first_line + L_LNNO32 (&lptr),
-                    lptr.l_addr.l_paddr
-                    + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)));
+       {
+         CORE_ADDR addr = lptr.l_addr.l_paddr;
+         addr += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+         record_line (current_subfile, first_line + L_LNNO32 (&lptr),
+                      gdbarch_addr_bits_remove (gdbarch, addr));
+       }
       else
        break;
     }
@@ -1708,7 +1713,7 @@ decode_type (struct coff_symbol *cs, unsigned int c_type,
          *dim = 0;
 
          base_type = decode_type (cs, new_c_type, aux, objfile);
-         index_type = builtin_type_int32;
+         index_type = objfile_type (objfile)->builtin_int;
          range_type =
            create_range_type ((struct type *) NULL, index_type, 0, n - 1);
          type =
@@ -1772,39 +1777,39 @@ decode_base_type (struct coff_symbol *cs, unsigned int c_type,
     {
     case T_NULL:
       /* shows up with "void (*foo)();" structure members */
-      return builtin_type (gdbarch)->builtin_void;
+      return objfile_type (objfile)->builtin_void;
 
 #ifdef T_VOID
     case T_VOID:
       /* Intel 960 COFF has this symbol and meaning.  */
-      return builtin_type (gdbarch)->builtin_void;
+      return objfile_type (objfile)->builtin_void;
 #endif
 
     case T_CHAR:
-      return builtin_type (gdbarch)->builtin_char;
+      return objfile_type (objfile)->builtin_char;
 
     case T_SHORT:
-      return builtin_type (gdbarch)->builtin_short;
+      return objfile_type (objfile)->builtin_short;
 
     case T_INT:
-      return builtin_type (gdbarch)->builtin_int;
+      return objfile_type (objfile)->builtin_int;
 
     case T_LONG:
       if (cs->c_sclass == C_FIELD
          && aux->x_sym.x_misc.x_lnsz.x_size
             > gdbarch_long_bit (gdbarch))
-       return builtin_type (gdbarch)->builtin_long_long;
+       return objfile_type (objfile)->builtin_long_long;
       else
-       return builtin_type (gdbarch)->builtin_long;
+       return objfile_type (objfile)->builtin_long;
 
     case T_FLOAT:
-      return builtin_type (gdbarch)->builtin_float;
+      return objfile_type (objfile)->builtin_float;
 
     case T_DOUBLE:
-      return builtin_type (gdbarch)->builtin_double;
+      return objfile_type (objfile)->builtin_double;
 
     case T_LNGDBL:
-      return builtin_type (gdbarch)->builtin_long_double;
+      return objfile_type (objfile)->builtin_long_double;
 
     case T_STRUCT:
       if (cs->c_naux != 1)
@@ -1885,24 +1890,24 @@ decode_base_type (struct coff_symbol *cs, unsigned int c_type,
       break;
 
     case T_UCHAR:
-      return builtin_type (gdbarch)->builtin_unsigned_char;
+      return objfile_type (objfile)->builtin_unsigned_char;
 
     case T_USHORT:
-      return builtin_type (gdbarch)->builtin_unsigned_short;
+      return objfile_type (objfile)->builtin_unsigned_short;
 
     case T_UINT:
-      return builtin_type (gdbarch)->builtin_unsigned_int;
+      return objfile_type (objfile)->builtin_unsigned_int;
 
     case T_ULONG:
       if (cs->c_sclass == C_FIELD
          && aux->x_sym.x_misc.x_lnsz.x_size
             > gdbarch_long_bit (gdbarch))
-       return builtin_type (gdbarch)->builtin_unsigned_long_long;
+       return objfile_type (objfile)->builtin_unsigned_long_long;
       else
-       return builtin_type (gdbarch)->builtin_unsigned_long;
+       return objfile_type (objfile)->builtin_unsigned_long;
     }
   complaint (&symfile_complaints, _("Unexpected type for symbol %s"), cs->c_name);
-  return builtin_type (gdbarch)->builtin_void;
+  return objfile_type (objfile)->builtin_void;
 }
 \f
 /* This page contains subroutines of read_type.  */
This page took 0.025919 seconds and 4 git commands to generate.