New files for IA-64 port.
[deliverable/binutils-gdb.git] / gdb / rs6000-nat.c
index b0a0021d5dee3a940d8f61f018c127f1e2cf9bf8..63fadcf9616e90e5baad7521c38231a6b2c6a59e 100644 (file)
@@ -215,6 +215,8 @@ store_inferior_registers (regno)
 
   else if (regno < FP0_REGNUM) /* a GPR */
     {
+      if (regno == SP_REGNUM)
+       exec_one_dummy_insn ();
       ptrace (PT_WRITE_GPR, inferior_pid, (PTRACE_ARG3_TYPE) regno,
              *(int *) &registers[REGISTER_BYTE (regno)], 0);
     }
@@ -233,6 +235,11 @@ store_inferior_registers (regno)
              *(int *) &registers[REGISTER_BYTE (regno)], 0);
     }
 
+  else if (regno < NUM_REGS)
+    {
+      /* Ignore it.  */
+    }
+
   else
     fprintf_unfiltered (gdb_stderr,
                        "Gdb error: register no %d not implemented.\n",
@@ -343,9 +350,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 +372,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 +448,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 +762,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 +821,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.027438 seconds and 4 git commands to generate.