If a region is specified assign it to all sections inside the overlay unless they...
[deliverable/binutils-gdb.git] / gdb / sparc-nat.c
index 017f31a42f9b0853b5e8677dfb94b45ee38f7976..feee2cc22fe61e2e4b130812c585369fafc63adb 100644 (file)
@@ -1,5 +1,6 @@
 /* Functions specific to running gdb native on a SPARC running SunOS4.
-   Copyright 1989, 1992, 1993, 1994, 1996 Free Software Foundation, Inc.
+   Copyright 1989, 1992, 1993, 1994, 1996, 1997, 1998, 1999, 2000, 2001
+   Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -22,6 +23,7 @@
 #include "inferior.h"
 #include "target.h"
 #include "gdbcore.h"
+#include "regcache.h"
 
 #include <signal.h>
 #include <sys/ptrace.h>
@@ -59,7 +61,7 @@ fetch_inferior_registers (int regno)
   /* We should never be called with deferred stores, because a prerequisite
      for writing regs is to have fetched them all (PREPARE_TO_STORE), sigh.  */
   if (deferred_stores)
-    abort ();
+    internal_error (__FILE__, __LINE__, "failed internal consistency check");
 
   DO_DEFERRED_STORES;
 
@@ -72,7 +74,7 @@ fetch_inferior_registers (int regno)
       || regno >= Y_REGNUM
       || (!register_valid[SP_REGNUM] && regno < I7_REGNUM))
     {
-      if (0 != ptrace (PTRACE_GETREGS, inferior_pid,
+      if (0 != ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
                       (PTRACE_ARG3_TYPE) & inferior_registers, 0))
        perror ("ptrace_getregs");
 
@@ -102,7 +104,7 @@ fetch_inferior_registers (int regno)
       regno == FPS_REGNUM ||
       (regno >= FP0_REGNUM && regno <= FP0_REGNUM + 31))
     {
-      if (0 != ptrace (PTRACE_GETFPREGS, inferior_pid,
+      if (0 != ptrace (PTRACE_GETFPREGS, PIDGET (inferior_ptid),
                       (PTRACE_ARG3_TYPE) & inferior_fp_registers,
                       0))
        perror ("ptrace_getfpregs");
@@ -195,7 +197,7 @@ store_inferior_registers (int regno)
       if (regno < 0 || regno == SP_REGNUM)
        {
          if (!register_valid[L0_REGNUM + 5])
-           abort ();
+           internal_error (__FILE__, __LINE__, "failed internal consistency check");
          target_write_memory (sp,
                               &registers[REGISTER_BYTE (L0_REGNUM)],
                               16 * REGISTER_RAW_SIZE (L0_REGNUM));
@@ -203,7 +205,7 @@ store_inferior_registers (int regno)
       else
        {
          if (!register_valid[regno])
-           abort ();
+           internal_error (__FILE__, __LINE__, "failed internal consistency check");
          target_write_memory (sp + REGISTER_BYTE (regno) - REGISTER_BYTE (L0_REGNUM),
                               &registers[REGISTER_BYTE (regno)],
                               REGISTER_RAW_SIZE (regno));
@@ -214,7 +216,7 @@ store_inferior_registers (int regno)
   if (wanna_store & INT_REGS)
     {
       if (!register_valid[G1_REGNUM])
-       abort ();
+       internal_error (__FILE__, __LINE__, "failed internal consistency check");
 
       memcpy (&inferior_registers.r_g1, &registers[REGISTER_BYTE (G1_REGNUM)],
              15 * REGISTER_RAW_SIZE (G1_REGNUM));
@@ -228,7 +230,7 @@ store_inferior_registers (int regno)
       inferior_registers.r_y =
        *(int *) &registers[REGISTER_BYTE (Y_REGNUM)];
 
-      if (0 != ptrace (PTRACE_SETREGS, inferior_pid,
+      if (0 != ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
                       (PTRACE_ARG3_TYPE) & inferior_registers, 0))
        perror ("ptrace_setregs");
     }
@@ -236,13 +238,13 @@ store_inferior_registers (int regno)
   if (wanna_store & FP_REGS)
     {
       if (!register_valid[FP0_REGNUM + 9])
-       abort ();
+       internal_error (__FILE__, __LINE__, "failed internal consistency check");
       memcpy (&inferior_fp_registers, &registers[REGISTER_BYTE (FP0_REGNUM)],
              sizeof inferior_fp_registers.fpu_fr);
       memcpy (&inferior_fp_registers.Fpu_fsr,
              &registers[REGISTER_BYTE (FPS_REGNUM)], sizeof (FPU_FSR_TYPE));
       if (0 !=
-         ptrace (PTRACE_SETFPREGS, inferior_pid,
+         ptrace (PTRACE_SETFPREGS, PIDGET (inferior_ptid),
                  (PTRACE_ARG3_TYPE) & inferior_fp_registers, 0))
        perror ("ptrace_setfpregs");
     }
This page took 0.024211 seconds and 4 git commands to generate.