aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-10-25 21:15:53 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-10-25 21:15:53 +0000
commita6e0dae9c3decfe89c70f020c048bc132bfa54a2 (patch)
treebd8dbf95da1b1d46a60b020b72ac4fe72b418b2c
parent59168c8b053591d680fdef52b1178ce9bd54f45e (diff)
downloadgdb-a6e0dae9c3decfe89c70f020c048bc132bfa54a2.zip
gdb-a6e0dae9c3decfe89c70f020c048bc132bfa54a2.tar.gz
gdb-a6e0dae9c3decfe89c70f020c048bc132bfa54a2.tar.bz2
* 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.
-rw-r--r--gdb/ChangeLog3
-rw-r--r--gdb/gdbserver/low-lynx.c4
-rw-r--r--gdb/gdbserver/low-sparc.c2
-rw-r--r--gdb/gdbserver/low-sun3.c18
-rw-r--r--gdb/i386m3-nat.c14
-rw-r--r--gdb/m3-nat.c4
-rw-r--r--gdb/mipsm3-nat.c18
-rw-r--r--gdb/ns32km3-nat.c12
-rw-r--r--gdb/standalone.c12
9 files changed, 46 insertions, 41 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8130c17..8625cf2 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 44070c5..ae4955c 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 eb578ee..8fb3f70 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 c318ff5..7b630a9 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 (&registers[REGISTER_BYTE (FP0_REGNUM)], &inferior_fp_registers,
- sizeof inferior_fp_registers.fps_regs);
+ memcpy (&inferior_fp_registers,
+ &registers[REGISTER_BYTE (FP0_REGNUM)],
+ sizeof inferior_fp_registers.fps_regs);
#endif
inferior_registers.r_ps = *(int *)&registers[REGISTER_BYTE (PS_REGNUM)];
inferior_registers.r_pc = *(int *)&registers[REGISTER_BYTE (PC_REGNUM)];
#ifdef FP0_REGNUM
- bcopy (&registers[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,
+ &registers[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 c150755..df42662 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), \
- &registers[REGISTER_BYTE (regnum)], \
- count*sizeof (REGISTER_TYPE))
+ memcpy (&registers[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 (&registers[REGISTER_BYTE (regnum)], \
- REG_ADDRESS (state, regnum), \
- count*sizeof (REGISTER_TYPE))
+ memcpy (REG_ADDRESS (state, regnum), \
+ &registers[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 66a21e5..fcb7b20 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 (&region_obstack);
diff --git a/gdb/mipsm3-nat.c b/gdb/mipsm3-nat.c
index fed0573..34434a6 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 ], \
- &registers[REGISTER_BYTE (regnum)], \
- count*sizeof (REGISTER_TYPE))
+ memcpy (&registers[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 (&registers[REGISTER_BYTE (regnum)], \
- (char *)state+reg_offset[ regnum ], \
- count*sizeof (REGISTER_TYPE))
+ memcpy ((char *)state+reg_offset[ regnum ], \
+ &registers[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 (&registers[REGISTER_BYTE (FP_REGNUM)],
- &registers[REGISTER_BYTE (MACH_FP_REGNUM)],
- REGISTER_RAW_SIZE (FP_REGNUM));
+ memcpy (&registers[REGISTER_BYTE (MACH_FP_REGNUM)],
+ &registers[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 087bb72..4002e45 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 ], \
- &registers[REGISTER_BYTE (regnum)], \
- count*sizeof (REGISTER_TYPE))
+ memcpy (&registers[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 (&registers[REGISTER_BYTE (regnum)], \
- (char *)state+reg_offset[ regnum ], \
- count*sizeof (REGISTER_TYPE))
+ memcpy ((char *)state+reg_offset[ regnum ], \
+ &registers[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 687b318..fa9b26f 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];
}