Corrected spelling error in comment: swaped -> swapped.
[deliverable/binutils-gdb.git] / gdb / rs6000-nat.c
index 6afb4cf76c0e9ed2168ce5ec5e6b48db2fd48940..6fa4560703ffeab678076603c358be620ec245db 100644 (file)
@@ -609,13 +609,13 @@ vmap_symtab (struct vmap *vp)
   new_offsets = (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
 
   for (i = 0; i < objfile->num_sections; ++i)
-    ANOFFSET (new_offsets, i) = ANOFFSET (objfile->section_offsets, i);
+    new_offsets->offsets[i] = ANOFFSET (objfile->section_offsets, i);
 
   /* The symbols in the object file are linked to the VMA of the section,
      relocate them VMA relative.  */
-  ANOFFSET (new_offsets, SECT_OFF_TEXT (objfile)) = vp->tstart - vp->tvma;
-  ANOFFSET (new_offsets, SECT_OFF_DATA (objfile)) = vp->dstart - vp->dvma;
-  ANOFFSET (new_offsets, SECT_OFF_BSS (objfile)) = vp->dstart - vp->dvma;
+  new_offsets->offsets[SECT_OFF_TEXT (objfile)] = vp->tstart - vp->tvma;
+  new_offsets->offsets[SECT_OFF_DATA (objfile)] = vp->dstart - vp->dvma;
+  new_offsets->offsets[SECT_OFF_BSS (objfile)] = vp->dstart - vp->dvma;
 
   objfile_relocate (objfile, new_offsets);
 }
@@ -908,7 +908,10 @@ set_host_arch (int pid)
   memset (&info, 0, sizeof info);
   info.bfd_arch_info = bfd_get_arch_info (&abfd);
 
-  gdbarch_update (info);
+  if (!gdbarch_update_p (info))
+    {
+      internal_error ("set_host_arch: failed to select architecture");
+    }
 }
 
 \f
@@ -928,7 +931,7 @@ xcoff_relocate_symtab (unsigned int pid)
   do
     {
       size = load_segs * ldisize;
-      ldi = (void *) xrealloc (ldi, load_segs * size);
+      ldi = (void *) xrealloc (ldi, size);
 
 #if 0
       /* According to my humble theory, AIX has some timing problems and
This page took 0.047688 seconds and 4 git commands to generate.