2004-04-04 Andrew Cagney <cagney@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Sun, 4 Apr 2004 14:23:51 +0000 (14:23 +0000)
committerAndrew Cagney <cagney@redhat.com>
Sun, 4 Apr 2004 14:23:51 +0000 (14:23 +0000)
* gnu-nat.c (gnu_wait): Use memcpy instead of bcopy.
* remote-vxmips.c (vx_read_register, vx_write_register): Ditto.
* remote-vx68.c (vx_read_register, vx_write_register): Ditto.

gdb/ChangeLog
gdb/gnu-nat.c
gdb/remote-vx68.c
gdb/remote-vxmips.c

index 5bba7e6d6098e89daf487c9d4999fdb09108fc80..28794941af39177131e2fd170e02c5f017185116 100644 (file)
@@ -1,5 +1,9 @@
 2004-04-04  Andrew Cagney  <cagney@redhat.com>
 
+       * gnu-nat.c (gnu_wait): Use memcpy instead of bcopy.
+       * remote-vxmips.c (vx_read_register, vx_write_register): Ditto.
+       * remote-vx68.c (vx_read_register, vx_write_register): Ditto.
+
        * config/vax/xm-vax.h (FAULT_CODE_ORIGIN, INIT_STACK): Delete.
        * config/alpha/xm-alphaosf.h (NO_SIGINTERRUPT): Delete.
        * config/alpha/xm-alphalinux.h (NO_SIGINTERRUPT): Delete.
index a61d577f8397f1d2c49cb6bd30584cef377c7935..dee0e2c7d2346915b6bf60368fd8b0bc6e6c52ac 100644 (file)
@@ -1574,7 +1574,7 @@ rewait:
     }
 
   /* Pass back out our results.  */
-  bcopy (&inf->wait.status, status, sizeof (*status));
+  memcpy (status, &inf->wait.status, sizeof (*status));
 
   thread = inf->wait.thread;
   if (thread)
index 8cdac6f02781f47c1d02613a1d42f3b1482920fc..8b008247e7259b3c81c07ccd46e9652d6e03d4f8 100644 (file)
@@ -85,14 +85,15 @@ vx_read_register (int regno)
 
   net_read_registers (mc68k_greg_packet, MC68K_GREG_PLEN, PTRACE_GETREGS);
 
-  bcopy (&mc68k_greg_packet[MC68K_R_D0], deprecated_registers,
-        16 * MC68K_GREG_SIZE);
-  bcopy (&mc68k_greg_packet[MC68K_R_SR],
-        &deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)],
-        MC68K_GREG_SIZE);
-  bcopy (&mc68k_greg_packet[MC68K_R_PC],
-        &deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)],
-        MC68K_GREG_SIZE);
+  memcpy (deprecated_registers,
+         &mc68k_greg_packet[MC68K_R_D0]
+         16 * MC68K_GREG_SIZE);
+  memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)],
+         &mc68k_greg_packet[MC68K_R_SR],
+         MC68K_GREG_SIZE);
+  memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)],
+         &mc68k_greg_packet[MC68K_R_PC],
+         MC68K_GREG_SIZE);
 
   /* Get floating-point registers, if the target system has them.
      Otherwise, zero them.  */
@@ -102,12 +103,12 @@ vx_read_register (int regno)
       net_read_registers (mc68k_fpreg_packet, MC68K_FPREG_PLEN,
                          PTRACE_GETFPREGS);
 
-      bcopy (&mc68k_fpreg_packet[MC68K_R_FP0],
-            &deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
-            MC68K_FPREG_SIZE * 8);
-      bcopy (&mc68k_fpreg_packet[MC68K_R_FPCR],
-            &deprecated_registers[DEPRECATED_REGISTER_BYTE (FPC_REGNUM)],
-            MC68K_FPREG_PLEN - (MC68K_FPREG_SIZE * 8));
+      memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
+             &mc68k_fpreg_packet[MC68K_R_FP0],
+             MC68K_FPREG_SIZE * 8);
+      memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FPC_REGNUM)],
+             &mc68k_fpreg_packet[MC68K_R_FPCR],
+             MC68K_FPREG_PLEN - (MC68K_FPREG_SIZE * 8));
     }
   else
     {
@@ -134,12 +135,14 @@ vx_write_register (int regno)
 
   /* Store general-purpose registers.  */
 
-  bcopy (deprecated_registers, &mc68k_greg_packet[MC68K_R_D0],
-        16 * MC68K_GREG_SIZE);
-  bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)],
-        &mc68k_greg_packet[MC68K_R_SR], MC68K_GREG_SIZE);
-  bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)],
-        &mc68k_greg_packet[MC68K_R_PC], MC68K_GREG_SIZE);
+  memcpy (&mc68k_greg_packet[MC68K_R_D0], deprecated_registers,
+         16 * MC68K_GREG_SIZE);
+  memcpy (&mc68k_greg_packet[MC68K_R_SR],
+         &deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)],
+         MC68K_GREG_SIZE);
+  memcpy (&mc68k_greg_packet[MC68K_R_PC],
+         &deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)],
+         MC68K_GREG_SIZE);
 
   net_write_registers (mc68k_greg_packet, MC68K_GREG_PLEN, PTRACE_SETREGS);
 
@@ -147,12 +150,12 @@ vx_write_register (int regno)
 
   if (target_has_fp)
     {
-      bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
-            &mc68k_fpreg_packet[MC68K_R_FP0],
-            MC68K_FPREG_SIZE * 8);
-      bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FPC_REGNUM)],
-            &mc68k_fpreg_packet[MC68K_R_FPCR],
-            MC68K_FPREG_PLEN - (MC68K_FPREG_SIZE * 8));
+      memcpy (&mc68k_fpreg_packet[MC68K_R_FP0],
+             &deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
+             MC68K_FPREG_SIZE * 8);
+      memcpy (&mc68k_fpreg_packet[MC68K_R_FPCR],
+             &deprecated_registers[DEPRECATED_REGISTER_BYTE (FPC_REGNUM)],
+             MC68K_FPREG_PLEN - (MC68K_FPREG_SIZE * 8));
 
       net_write_registers (mc68k_fpreg_packet, MC68K_FPREG_PLEN,
                           PTRACE_SETFPREGS);
index 55ba49b98ca74337e56fca5f7e33c0807acea983..617bce026c707f4313abdeb16ffdf725e2db6231 100644 (file)
@@ -103,19 +103,23 @@ vx_read_register (int regno)
 
   /* Copy the general registers.  */
 
-  bcopy (&mips_greg_packet[MIPS_R_GP0], &deprecated_registers[0],
-        32 * MIPS_GREG_SIZE);
+  memcpy (&deprecated_registers[0], &mips_greg_packet[MIPS_R_GP0],
+         32 * MIPS_GREG_SIZE);
 
   /* Copy SR, LO, HI, and PC.  */
 
-  bcopy (&mips_greg_packet[MIPS_R_SR],
-        &deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)], MIPS_GREG_SIZE);
-  bcopy (&mips_greg_packet[MIPS_R_LO],
-        &deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->lo)], MIPS_GREG_SIZE);
-  bcopy (&mips_greg_packet[MIPS_R_HI],
-        &deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->hi)], MIPS_GREG_SIZE);
-  bcopy (&mips_greg_packet[MIPS_R_PC],
-        &deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->pc)], MIPS_GREG_SIZE);
+  memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)],
+         &mips_greg_packet[MIPS_R_SR],
+         MIPS_GREG_SIZE);
+  memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->lo)],
+         &mips_greg_packet[MIPS_R_LO],
+         MIPS_GREG_SIZE);
+  memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->hi)],
+         &mips_greg_packet[MIPS_R_HI],
+         MIPS_GREG_SIZE);
+  memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->pc)],
+         &mips_greg_packet[MIPS_R_PC],
+         MIPS_GREG_SIZE);
 
   /* If the target has floating point registers, fetch them.
      Otherwise, zero the floating point register values in
@@ -129,15 +133,15 @@ vx_read_register (int regno)
 
       /* Copy the floating point registers.  */
 
-      bcopy (&mips_fpreg_packet[MIPS_R_FP0],
-            &deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
-            DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM) * 32);
+      memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
+             &mips_fpreg_packet[MIPS_R_FP0],
+             DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM) * 32);
 
       /* Copy the floating point control/status register (fpcsr).  */
 
-      bcopy (&mips_fpreg_packet[MIPS_R_FPCSR],
-            &deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->fp_control_status)],
-            DEPRECATED_REGISTER_RAW_SIZE (mips_regnum (current_gdbarch)->fp_control_status));
+      memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->fp_control_status)],
+             &mips_fpreg_packet[MIPS_R_FPCSR],
+             DEPRECATED_REGISTER_RAW_SIZE (mips_regnum (current_gdbarch)->fp_control_status));
     }
   else
     {
@@ -163,19 +167,23 @@ vx_write_register (int regno)
 
   /* Store general registers.  */
 
-  bcopy (&deprecated_registers[0], &mips_greg_packet[MIPS_R_GP0],
-        32 * MIPS_GREG_SIZE);
+  memcpy (&mips_greg_packet[MIPS_R_GP0], &deprecated_registers[0],
+         32 * MIPS_GREG_SIZE);
 
   /* Copy SR, LO, HI, and PC.  */
 
-  bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)],
-        &mips_greg_packet[MIPS_R_SR], MIPS_GREG_SIZE);
-  bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->lo)],
-        &mips_greg_packet[MIPS_R_LO], MIPS_GREG_SIZE);
-  bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->hi)],
-        &mips_greg_packet[MIPS_R_HI], MIPS_GREG_SIZE);
-  bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->pc)],
-        &mips_greg_packet[MIPS_R_PC], MIPS_GREG_SIZE);
+  memcpy (&mips_greg_packet[MIPS_R_SR],
+         &deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)],
+         MIPS_GREG_SIZE);
+  memcpy (&mips_greg_packet[MIPS_R_LO],
+         &deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->lo)],
+         MIPS_GREG_SIZE);
+  memcpy (&mips_greg_packet[MIPS_R_HI],
+         &deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->hi)],
+         MIPS_GREG_SIZE);
+  memcpy (&mips_greg_packet[MIPS_R_PC],
+         &deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->pc)],
+         MIPS_GREG_SIZE);
 
   net_write_registers (mips_greg_packet, MIPS_GREG_PLEN, PTRACE_SETREGS);
 
@@ -185,15 +193,15 @@ vx_write_register (int regno)
     {
       /* Copy the floating point data registers.  */
 
-      bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
-            &mips_fpreg_packet[MIPS_R_FP0],
-            DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM) * 32);
+      memcpy (&mips_fpreg_packet[MIPS_R_FP0],
+             &deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
+             DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM) * 32);
 
       /* Copy the floating point control/status register (fpcsr).  */
 
-      bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->fp_control_status)],
-            &mips_fpreg_packet[MIPS_R_FPCSR],
-            DEPRECATED_REGISTER_RAW_SIZE (mips_regnum (current_gdbarch)->fp_control_status));
+      memcpy (&mips_fpreg_packet[MIPS_R_FPCSR],
+             &deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->fp_control_status)],
+             DEPRECATED_REGISTER_RAW_SIZE (mips_regnum (current_gdbarch)->fp_control_status));
 
       net_write_registers (mips_fpreg_packet, MIPS_FPREG_PLEN,
                           PTRACE_SETFPREGS);