It exists so that all calls to ptrace are isolated in this
machine-dependent file. */
int
-call_ptrace (int request, int pid, PTRACE_ARG3_TYPE addr, int data)
+call_ptrace (int request, int pid, PTRACE_TYPE_ARG3 addr, int data)
{
int pt_status = 0;
The kill call causes problems under hpux10, so it's been removed;
if this causes problems we'll deal with them as they arise. */
- ptrace (PT_KILL, pid, (PTRACE_ARG3_TYPE) 0, 0);
+ ptrace (PT_KILL, pid, (PTRACE_TYPE_ARG3) 0, 0);
ptrace_wait (null_ptid, &status);
target_mourn_inferior ();
}
all threads" and "resume inferior_ptid" are the same. */
pid = PIDGET (inferior_ptid);
- /* An address of (PTRACE_ARG3_TYPE)1 tells ptrace to continue from where
+ /* An address of (PTRACE_TYPE_ARG3)1 tells ptrace to continue from where
it was. (If GDB wanted it to start some other way, we have already
written a new PC value to the child.)
if (SOFTWARE_SINGLE_STEP_P ())
internal_error (__FILE__, __LINE__, "failed internal consistency check"); /* Make sure this doesn't happen. */
else
- ptrace (PT_STEP, pid, (PTRACE_ARG3_TYPE) 1,
+ ptrace (PT_STEP, pid, (PTRACE_TYPE_ARG3) 1,
target_signal_to_host (signal));
}
else
- ptrace (PT_CONTINUE, pid, (PTRACE_ARG3_TYPE) 1,
+ ptrace (PT_CONTINUE, pid, (PTRACE_TYPE_ARG3) 1,
target_signal_to_host (signal));
if (errno)
#endif
#endif
#ifdef PT_ATTACH
- ptrace (PT_ATTACH, pid, (PTRACE_ARG3_TYPE) 0, 0);
+ ptrace (PT_ATTACH, pid, (PTRACE_TYPE_ARG3) 0, 0);
if (errno)
perror_with_name ("ptrace");
attach_flag = 1;
#endif
#endif
#ifdef PT_DETACH
- ptrace (PT_DETACH, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) 1,
+ ptrace (PT_DETACH, PIDGET (inferior_ptid), (PTRACE_TYPE_ARG3) 1,
signal);
if (errno)
print_sys_errmsg ("ptrace", errno);
#if !defined (U_REGS_OFFSET)
#define U_REGS_OFFSET \
ptrace (PT_READ_U, PIDGET (inferior_ptid), \
- (PTRACE_ARG3_TYPE) (offsetof (struct user, u_ar0)), 0) \
+ (PTRACE_TYPE_ARG3) (offsetof (struct user, u_ar0)), 0) \
- KERNEL_U_ADDR
#endif
{
errno = 0;
*(PTRACE_XFER_TYPE *) & buf[i] = ptrace (PT_READ_U, tid,
- (PTRACE_ARG3_TYPE) regaddr, 0);
+ (PTRACE_TYPE_ARG3) regaddr, 0);
regaddr += sizeof (PTRACE_XFER_TYPE);
if (errno != 0)
{
for (i = 0; i < register_size (current_gdbarch, regno); i += sizeof (PTRACE_XFER_TYPE))
{
errno = 0;
- ptrace (PT_WRITE_U, tid, (PTRACE_ARG3_TYPE) regaddr,
+ ptrace (PT_WRITE_U, tid, (PTRACE_TYPE_ARG3) regaddr,
*(PTRACE_XFER_TYPE *) (buf + i));
regaddr += sizeof (PTRACE_XFER_TYPE);
if (errno != 0)
{
/* Need part of initial word -- fetch it. */
buffer[0] = ptrace (PT_READ_I, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) addr, 0);
+ (PTRACE_TYPE_ARG3) addr, 0);
}
if (count > 1) /* FIXME, avoid if even boundary. */
{
buffer[count - 1] =
ptrace (PT_READ_I, PIDGET (inferior_ptid),
- ((PTRACE_ARG3_TYPE)
+ ((PTRACE_TYPE_ARG3)
(addr + (count - 1) * sizeof (PTRACE_XFER_TYPE))), 0);
}
{
errno = 0;
ptrace (PT_WRITE_D, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) addr, buffer[i]);
+ (PTRACE_TYPE_ARG3) addr, buffer[i]);
if (errno)
{
/* Using the appropriate one (I or D) is necessary for
Gould NP1, at least. */
errno = 0;
ptrace (PT_WRITE_I, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) addr, buffer[i]);
+ (PTRACE_TYPE_ARG3) addr, buffer[i]);
}
if (errno)
return 0;
{
errno = 0;
buffer[i] = ptrace (PT_READ_I, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) addr, 0);
+ (PTRACE_TYPE_ARG3) addr, 0);
if (errno)
return 0;
QUIT;
}
printf_filtered ("%s:", paddr (udot_off));
}
- udot_val = ptrace (PT_READ_U, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) udot_off, 0);
+ udot_val = ptrace (PT_READ_U, PIDGET (inferior_ptid), (PTRACE_TYPE_ARG3) udot_off, 0);
if (errno != 0)
{
sprintf (mess, "\nreading user struct at offset 0x%s",