Replace ../include/wait.h with gdb_wait.h.
[deliverable/binutils-gdb.git] / gdb / rs6000-nat.c
index b0a0021d5dee3a940d8f61f018c127f1e2cf9bf8..d109f3319e85e05378d670c0d37e1e10d0918bb1 100644 (file)
@@ -343,9 +343,7 @@ vmap_symtab (vp)
       objfile = symfile_objfile;
     }
 
-  new_offsets = alloca
-    (sizeof (struct section_offsets)
-     + sizeof (new_offsets->offsets) * objfile->num_sections);
+  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);
@@ -367,7 +365,7 @@ objfile_symbol_add (arg)
 {
   struct objfile *obj = (struct objfile *) arg;
 
-  syms_from_objfile (obj, 0, 0, 0);
+  syms_from_objfile (obj, NULL, 0, 0);
   new_symfile_objfile (obj, 0, 0);
   return 1;
 }
@@ -443,7 +441,7 @@ add_vmap (ldi)
             objname, bfd_errmsg (bfd_get_error ()));
       /*NOTREACHED */
     }
-  obj = allocate_objfile (vp->bfd, 0, 0, 0);
+  obj = allocate_objfile (vp->bfd, 0);
   vp->objfile = obj;
 
 #ifndef SOLIB_SYMBOLS_MANUAL
@@ -757,28 +755,9 @@ xcoff_relocate_core (target)
          add our sections to the section table for the core target.  */
       if (vp != vmap)
        {
-         int count;
          struct section_table *stp;
-         int update_coreops;
-
-         /* We must update the to_sections field in the core_ops structure
-            now to avoid dangling pointer dereferences.  */
-         update_coreops = core_ops.to_sections == target->to_sections;
-
-         count = target->to_sections_end - target->to_sections;
-         count += 2;
-         target->to_sections = (struct section_table *)
-           xrealloc (target->to_sections,
-                     sizeof (struct section_table) * count);
-         target->to_sections_end = target->to_sections + count;
-
-         /* Update the to_sections field in the core_ops structure
-            if needed.  */
-         if (update_coreops)
-           {
-             core_ops.to_sections = target->to_sections;
-             core_ops.to_sections_end = target->to_sections_end;
-           }
+
+         target_resize_to_sections (target, 2);
          stp = target->to_sections_end - 2;
 
          stp->bfd = vp->bfd;
@@ -835,9 +814,11 @@ find_toc_address (pc)
 
 static struct core_fns rs6000_core_fns =
 {
-  bfd_target_coff_flavour,
-  fetch_core_registers,
-  NULL
+  bfd_target_coff_flavour,             /* core_flavour */
+  default_check_format,                        /* check_format */
+  default_core_sniffer,                        /* core_sniffer */
+  fetch_core_registers,                        /* core_read_registers */
+  NULL                                 /* next */
 };
 
 void
This page took 0.024855 seconds and 4 git commands to generate.