m3-nat.c, i386m3-nat.c, mipsm3-nat.c, ns32km3-nat.c: bcopy -> memcpy.
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.
}
/* 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
/* 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. */
}
/* 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
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,
}
/* 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
/* 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. */
* 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))
\f
/*
* Fetch inferiors registers for gdb.
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;
}
}
}
- 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,
deallocate++;
- bcopy (myaddr, (char *)addr - low_address + copied_memory, length);
+ memcpy ((char *)addr - low_address + copied_memory, myaddr, length);
obstack_init (®ion_obstack);
* 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
* 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
* 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))
\f
/* 4.4 bfd support function */
/* jtv@hut.fi: UNIMPLEMENTED!!!!! */
return -1;
}
- bcopy (sourceptr, destptr, len);
+ memcpy (destptr, sourceptr, len);
sourceleft -= len;
return len;
}
return -1;
}
- bcopy (sourceptr, bufp, len);
+ memcpy (bufp, sourceptr, len);
sourceleft -= len;
return elts;
}
char *myaddr;
int len;
{
- bcopy (memaddr, myaddr, len);
+ memcpy (myaddr, memaddr, len);
}
/* Always return 0 indicating success. */
char *myaddr;
int len;
{
- bcopy (myaddr, memaddr, len);
+ memcpy (memaddr, myaddr, len);
return 0;
}
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! */
}
save_registers (firstreg)
int firstreg;
{
- bcopy (&firstreg, saved_regs, sizeof saved_regs);
+ memcpy (saved_regs, &firstreg, sizeof saved_regs);
fault_code = (&firstreg)[NUM_REGS];
}