/* Call ptrace(REQ, ID, ADDR, DATA, BUF). */
static int
-ptrace32 (int req, int id, int *addr, int data, int *buf)
+rs6000_ptrace32 (int req, int id, int *addr, int data, int *buf)
{
int ret = ptrace (req, id, (int *)addr, data, buf);
#if 0
- printf ("ptrace32 (%d, %d, 0x%x, %08x, 0x%x) = 0x%x\n",
+ printf ("rs6000_ptrace32 (%d, %d, 0x%x, %08x, 0x%x) = 0x%x\n",
req, id, (unsigned int)addr, data, (unsigned int)buf, ret);
#endif
return ret;
/* Call ptracex(REQ, ID, ADDR, DATA, BUF). */
static int
-ptrace64 (int req, int id, long long addr, int data, int *buf)
+rs6000_ptrace64 (int req, int id, long long addr, int data, int *buf)
{
#ifdef ARCH3264
int ret = ptracex (req, id, addr, data, buf);
int ret = 0;
#endif
#if 0
- printf ("ptrace64 (%d, %d, 0x%llx, %08x, 0x%x) = 0x%x\n",
+ printf ("rs6000_ptrace64 (%d, %d, 0x%llx, %08x, 0x%x) = 0x%x\n",
req, id, addr, data, (unsigned int)buf, ret);
#endif
return ret;
if (regno >= FP0_REGNUM && regno <= FPLAST_REGNUM)
{
nr = regno - FP0_REGNUM + FPR0;
- ptrace32 (PT_READ_FPR, PIDGET (inferior_ptid), addr, nr, 0);
+ rs6000_ptrace32 (PT_READ_FPR, PIDGET (inferior_ptid), addr, nr, 0);
}
/* Bogus register number. */
nr = regno;
if (!ARCH64 ())
- *addr = ptrace32 (PT_READ_GPR, PIDGET (inferior_ptid), (int *)nr, 0, 0);
+ *addr = rs6000_ptrace32 (PT_READ_GPR, PIDGET (inferior_ptid), (int *)nr, 0, 0);
else
{
/* PT_READ_GPR requires the buffer parameter to point to long long,
even if the register is really only 32 bits. */
long long buf;
- ptrace64 (PT_READ_GPR, PIDGET (inferior_ptid), nr, 0, (int *)&buf);
+ rs6000_ptrace64 (PT_READ_GPR, PIDGET (inferior_ptid), nr, 0, (int *)&buf);
if (REGISTER_RAW_SIZE (regno) == 8)
memcpy (addr, &buf, 8);
else
if (regno >= FP0_REGNUM && regno <= FPLAST_REGNUM)
{
nr = regno - FP0_REGNUM + FPR0;
- ptrace32 (PT_WRITE_FPR, PIDGET (inferior_ptid), addr, nr, 0);
+ rs6000_ptrace32 (PT_WRITE_FPR, PIDGET (inferior_ptid), addr, nr, 0);
}
/* Bogus register number. */
nr = regno;
if (!ARCH64 ())
- ptrace32 (PT_WRITE_GPR, PIDGET (inferior_ptid), (int *)nr, *addr, 0);
+ rs6000_ptrace32 (PT_WRITE_GPR, PIDGET (inferior_ptid), (int *)nr, *addr, 0);
else
{
/* PT_WRITE_GPR requires the buffer parameter to point to an 8-byte
memcpy (&buf, addr, 8);
else
buf = *addr;
- ptrace64 (PT_WRITE_GPR, PIDGET (inferior_ptid), nr, 0, (int *)&buf);
+ rs6000_ptrace64 (PT_WRITE_GPR, PIDGET (inferior_ptid), nr, 0, (int *)&buf);
}
}
errno = 0;
if (arch64)
- *to = ptrace64 (PT_READ_I, PIDGET (inferior_ptid), from, 0, NULL);
+ *to = rs6000_ptrace64 (PT_READ_I, PIDGET (inferior_ptid), from, 0, NULL);
else
- *to = ptrace32 (PT_READ_I, PIDGET (inferior_ptid), (int *)(long) from,
+ *to = rs6000_ptrace32 (PT_READ_I, PIDGET (inferior_ptid), (int *)(long) from,
0, NULL);
return !errno;
for (i = 0, errno = 0; i < count; i++, addr += sizeof (int))
{
if (arch64)
- ptrace64 (PT_WRITE_D, PIDGET (inferior_ptid), addr, buf[i], NULL);
+ rs6000_ptrace64 (PT_WRITE_D, PIDGET (inferior_ptid), addr, buf[i], NULL);
else
- ptrace32 (PT_WRITE_D, PIDGET (inferior_ptid), (int *)(long) addr,
+ rs6000_ptrace32 (PT_WRITE_D, PIDGET (inferior_ptid), (int *)(long) addr,
buf[i], NULL);
if (errno)
prev_pc = read_pc ();
write_pc (DUMMY_INSN_ADDR);
if (ARCH64 ())
- ret = ptrace64 (PT_CONTINUE, PIDGET (inferior_ptid), 1, 0, NULL);
+ ret = rs6000_ptrace64 (PT_CONTINUE, PIDGET (inferior_ptid), 1, 0, NULL);
else
- ret = ptrace32 (PT_CONTINUE, PIDGET (inferior_ptid), (int *)1, 0, NULL);
+ ret = rs6000_ptrace32 (PT_CONTINUE, PIDGET (inferior_ptid), (int *)1, 0, NULL);
if (ret != 0)
perror ("pt_continue");
#endif
if (arch64)
- rc = ptrace64 (PT_LDINFO, pid, (unsigned long) ldi, size, NULL);
+ rc = rs6000_ptrace64 (PT_LDINFO, pid, (unsigned long) ldi, size, NULL);
else
- rc = ptrace32 (PT_LDINFO, pid, (int *) ldi, size, NULL);
+ rc = rs6000_ptrace32 (PT_LDINFO, pid, (int *) ldi, size, NULL);
if (rc == -1)
{