From: Jim Kingdon Date: Mon, 25 Oct 1993 21:15:53 +0000 (+0000) Subject: * gdbserver/{low-lynx.c,low-sparc.c,low-sun3.c}, standalone.c, X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a6e0dae9c3decfe89c70f020c048bc132bfa54a2;p=binutils-gdb.git * gdbserver/{low-lynx.c,low-sparc.c,low-sun3.c}, standalone.c, m3-nat.c, i386m3-nat.c, mipsm3-nat.c, ns32km3-nat.c: bcopy -> memcpy. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8130c175e47..8625cf2826c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,8 @@ Mon Oct 25 14:57:45 1993 Jim Kingdon (kingdon@lioth.cygnus.com) + * gdbserver/{low-lynx.c,low-sparc.c,low-sun3.c}, standalone.c, + m3-nat.c, i386m3-nat.c, mipsm3-nat.c, ns32km3-nat.c: bcopy -> memcpy. + gcc -Wall lint: * breakpoint.c: Include thread.h. * coffread.c: Include stabsread.h. diff --git a/gdb/gdbserver/low-lynx.c b/gdb/gdbserver/low-lynx.c index 44070c52158..ae4955c8264 100644 --- a/gdb/gdbserver/low-lynx.c +++ b/gdb/gdbserver/low-lynx.c @@ -283,7 +283,7 @@ read_inferior_memory (memaddr, myaddr, len) } /* Copy appropriate bytes out of the buffer. */ - bcopy ((char *) buffer + (memaddr & (sizeof (int) - 1)), myaddr, len); + memcpy (myaddr, (char *) buffer + (memaddr & (sizeof (int) - 1)), len); } /* Copy LEN bytes of data from debugger memory at MYADDR @@ -320,7 +320,7 @@ write_inferior_memory (memaddr, myaddr, len) /* Copy data to be written over corresponding part of buffer */ - bcopy (myaddr, (char *) buffer + (memaddr & (sizeof (int) - 1)), len); + memcpy ((char *) buffer + (memaddr & (sizeof (int) - 1)), myaddr, len); /* Write the entire buffer. */ diff --git a/gdb/gdbserver/low-sparc.c b/gdb/gdbserver/low-sparc.c index eb578eee2eb..8fb3f70542a 100644 --- a/gdb/gdbserver/low-sparc.c +++ b/gdb/gdbserver/low-sparc.c @@ -261,7 +261,7 @@ read_inferior_memory (memaddr, myaddr, len) } /* Copy appropriate bytes out of the buffer. */ - bcopy ((char *) buffer + (memaddr & (sizeof (int) - 1)), myaddr, len); + memcpy (myaddr, (char *) buffer + (memaddr & (sizeof (int) - 1)), len); } /* Copy LEN bytes of data from debugger memory at MYADDR diff --git a/gdb/gdbserver/low-sun3.c b/gdb/gdbserver/low-sun3.c index c318ff5be12..7b630a92f3b 100644 --- a/gdb/gdbserver/low-sun3.c +++ b/gdb/gdbserver/low-sun3.c @@ -186,18 +186,20 @@ store_inferior_registers (ignored) struct regs inferior_registers; struct fp_status inferior_fp_registers; - bcopy (registers, &inferior_registers, 16 * 4); + memcpy (&inferior_registers, registers, 16 * 4); #ifdef FP0_REGNUM - bcopy (®isters[REGISTER_BYTE (FP0_REGNUM)], &inferior_fp_registers, - sizeof inferior_fp_registers.fps_regs); + memcpy (&inferior_fp_registers, + ®isters[REGISTER_BYTE (FP0_REGNUM)], + sizeof inferior_fp_registers.fps_regs); #endif inferior_registers.r_ps = *(int *)®isters[REGISTER_BYTE (PS_REGNUM)]; inferior_registers.r_pc = *(int *)®isters[REGISTER_BYTE (PC_REGNUM)]; #ifdef FP0_REGNUM - bcopy (®isters[REGISTER_BYTE (FPC_REGNUM)], - &inferior_fp_registers.fps_control, - sizeof inferior_fp_registers - sizeof inferior_fp_registers.fps_regs); + memcpy (&inferior_fp_registers.fps_control, + ®isters[REGISTER_BYTE (FPC_REGNUM)], + (sizeof inferior_fp_registers + - sizeof inferior_fp_registers.fps_regs)); #endif ptrace (PTRACE_SETREGS, inferior_pid, @@ -238,7 +240,7 @@ read_inferior_memory (memaddr, myaddr, len) } /* Copy appropriate bytes out of the buffer. */ - bcopy ((char *) buffer + (memaddr & (sizeof (int) - 1)), myaddr, len); + memcpy (myaddr, (char *) buffer + (memaddr & (sizeof (int) - 1)), len); } /* Copy LEN bytes of data from debugger memory at MYADDR @@ -275,7 +277,7 @@ write_inferior_memory (memaddr, myaddr, len) /* Copy data to be written over corresponding part of buffer */ - bcopy (myaddr, (char *) buffer + (memaddr & (sizeof (int) - 1)), len); + memcpy ((char *) buffer + (memaddr & (sizeof (int) - 1)), myaddr, len); /* Write the entire buffer. */ diff --git a/gdb/i386m3-nat.c b/gdb/i386m3-nat.c index c150755e7eb..df42662f006 100644 --- a/gdb/i386m3-nat.c +++ b/gdb/i386m3-nat.c @@ -85,15 +85,15 @@ static int reg_offset[] = * Caller knows that the regs handled in one transaction are of same size. */ #define FETCH_REGS(state, regnum, count) \ - bcopy (REG_ADDRESS (state, regnum), \ - ®isters[REGISTER_BYTE (regnum)], \ - count*sizeof (REGISTER_TYPE)) + memcpy (®isters[REGISTER_BYTE (regnum)], \ + REG_ADDRESS (state, regnum), \ + count*sizeof (REGISTER_TYPE)) /* Store COUNT contiguous registers to thread STATE starting from REGNUM */ #define STORE_REGS(state, regnum, count) \ - bcopy (®isters[REGISTER_BYTE (regnum)], \ - REG_ADDRESS (state, regnum), \ - count*sizeof (REGISTER_TYPE)) + memcpy (REG_ADDRESS (state, regnum), \ + ®isters[REGISTER_BYTE (regnum)], \ + count*sizeof (REGISTER_TYPE)) /* * Fetch inferiors registers for gdb. @@ -380,7 +380,7 @@ get_i387_state (fstate) fstate->status = fsp->exc_status; - bcopy ((char *)&fsp->hw_state, fstate->state, FP_STATE_BYTES); + memcpy (fstate->state, (char *)&fsp->hw_state, FP_STATE_BYTES); return TRUE; } diff --git a/gdb/m3-nat.c b/gdb/m3-nat.c index 66a21e5c13f..fcb7b2057ee 100644 --- a/gdb/m3-nat.c +++ b/gdb/m3-nat.c @@ -1798,7 +1798,7 @@ mach3_read_inferior (addr, myaddr, length) } } - bcopy ((char *)addr - low_address + copied_memory, myaddr, length); + memcpy (myaddr, (char *)addr - low_address + copied_memory, length); ret = vm_deallocate (mach_task_self (), copied_memory, @@ -1858,7 +1858,7 @@ mach3_write_inferior (addr, myaddr, length) deallocate++; - bcopy (myaddr, (char *)addr - low_address + copied_memory, length); + memcpy ((char *)addr - low_address + copied_memory, myaddr, length); obstack_init (®ion_obstack); diff --git a/gdb/mipsm3-nat.c b/gdb/mipsm3-nat.c index fed0573d8e6..34434a6de2d 100644 --- a/gdb/mipsm3-nat.c +++ b/gdb/mipsm3-nat.c @@ -120,15 +120,15 @@ static int reg_offset[] = * Caller knows that the regs handled in one transaction are of same size. */ #define FETCH_REGS(state, regnum, count) \ - bcopy ((char *)state+reg_offset[ regnum ], \ - ®isters[REGISTER_BYTE (regnum)], \ - count*sizeof (REGISTER_TYPE)) + memcpy (®isters[REGISTER_BYTE (regnum)], \ + (char *)state+reg_offset[ regnum ], \ + count*sizeof (REGISTER_TYPE)) /* Store COUNT contiguous registers to thread STATE starting from REGNUM */ #define STORE_REGS(state, regnum, count) \ - bcopy (®isters[REGISTER_BYTE (regnum)], \ - (char *)state+reg_offset[ regnum ], \ - count*sizeof (REGISTER_TYPE)) + memcpy ((char *)state+reg_offset[ regnum ], \ + ®isters[REGISTER_BYTE (regnum)], \ + count*sizeof (REGISTER_TYPE)) #define REGS_ALL -1 #define REGS_NORMAL 1 @@ -342,9 +342,9 @@ store_inferior_registers (regno) * should go to threads frame pointer. If not true, this * fails badly!!!!! */ - bcopy (®isters[REGISTER_BYTE (FP_REGNUM)], - ®isters[REGISTER_BYTE (MACH_FP_REGNUM)], - REGISTER_RAW_SIZE (FP_REGNUM)); + memcpy (®isters[REGISTER_BYTE (MACH_FP_REGNUM)], + ®isters[REGISTER_BYTE (FP_REGNUM)], + REGISTER_RAW_SIZE (FP_REGNUM)); #endif /* Save gdb's regs 1..31 to thread saved regs 1..31 diff --git a/gdb/ns32km3-nat.c b/gdb/ns32km3-nat.c index 087bb72b242..4002e45a02d 100644 --- a/gdb/ns32km3-nat.c +++ b/gdb/ns32km3-nat.c @@ -58,15 +58,15 @@ static int reg_offset[] = * Caller knows that the regs handled in one transaction are of same size. */ #define FETCH_REGS(state, regnum, count) \ - bcopy ((char *)state+reg_offset[ regnum ], \ - ®isters[REGISTER_BYTE (regnum)], \ - count*sizeof (REGISTER_TYPE)) + memcpy (®isters[REGISTER_BYTE (regnum)], \ + (char *)state+reg_offset[ regnum ], \ + count*sizeof (REGISTER_TYPE)) /* Store COUNT contiguous registers to thread STATE starting from REGNUM */ #define STORE_REGS(state, regnum, count) \ - bcopy (®isters[REGISTER_BYTE (regnum)], \ - (char *)state+reg_offset[ regnum ], \ - count*sizeof (REGISTER_TYPE)) + memcpy ((char *)state+reg_offset[ regnum ], \ + ®isters[REGISTER_BYTE (regnum)], \ + count*sizeof (REGISTER_TYPE)) /* 4.4 bfd support function */ /* jtv@hut.fi: UNIMPLEMENTED!!!!! */ diff --git a/gdb/standalone.c b/gdb/standalone.c index 687b3183b68..fa9b26f222f 100644 --- a/gdb/standalone.c +++ b/gdb/standalone.c @@ -213,7 +213,7 @@ myread (desc, destptr, size, filename) return -1; } - bcopy (sourceptr, destptr, len); + memcpy (destptr, sourceptr, len); sourceleft -= len; return len; } @@ -230,7 +230,7 @@ fread (bufp, numelts, eltsize, stream) return -1; } - bcopy (sourceptr, bufp, len); + memcpy (bufp, sourceptr, len); sourceleft -= len; return elts; } @@ -370,7 +370,7 @@ read_memory (memaddr, myaddr, len) char *myaddr; int len; { - bcopy (memaddr, myaddr, len); + memcpy (myaddr, memaddr, len); } /* Always return 0 indicating success. */ @@ -380,7 +380,7 @@ write_memory (memaddr, myaddr, len) char *myaddr; int len; { - bcopy (myaddr, memaddr, len); + memcpy (memaddr, myaddr, len); return 0; } @@ -487,7 +487,7 @@ resume () PUSH_FRAME_PTR; save_frame_pointer (); - bcopy (saved_regs, restore, sizeof restore); + memcpy (restore, saved_regs, sizeof restore); POP_REGISTERS; /* Control does not drop through here! */ } @@ -533,7 +533,7 @@ restore_gdb () save_registers (firstreg) int firstreg; { - bcopy (&firstreg, saved_regs, sizeof saved_regs); + memcpy (saved_regs, &firstreg, sizeof saved_regs); fault_code = (&firstreg)[NUM_REGS]; }