diff options
author | Andrew Cagney <cagney@redhat.com> | 2004-04-04 14:23:51 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2004-04-04 14:23:51 +0000 |
commit | 98d346c38e53e4d3259184f5405f6ae0d12627ba (patch) | |
tree | 78a8ad6db084f74c500cf8e141111248be20ecc9 /gdb/remote-vxmips.c | |
parent | 6cdf9d98c7b8abfc2a4f54d603667231067093e8 (diff) | |
download | gdb-98d346c38e53e4d3259184f5405f6ae0d12627ba.zip gdb-98d346c38e53e4d3259184f5405f6ae0d12627ba.tar.gz gdb-98d346c38e53e4d3259184f5405f6ae0d12627ba.tar.bz2 |
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.
Diffstat (limited to 'gdb/remote-vxmips.c')
-rw-r--r-- | gdb/remote-vxmips.c | 72 |
1 files changed, 40 insertions, 32 deletions
diff --git a/gdb/remote-vxmips.c b/gdb/remote-vxmips.c index 55ba49b..617bce0 100644 --- a/gdb/remote-vxmips.c +++ b/gdb/remote-vxmips.c @@ -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); |