3 --- util.c.orig 2005-10-21 18:06:46.000000000 -0400
4 +++ util.c 2007-04-27 11:31:51.000000000 -0400
9 +#include <sys/param.h>
10 #include <sys/syscall.h>
12 -#include <sys/param.h>
21 +#include <machine/reg.h>
25 # define PTRACE_PEEKUSR PTRACE_PEEKUSER
27 # define PTRACE_SETREGS PTRACE_SETREGS64
31 #if !defined(__GLIBC__)
33 #include <linux/unistd.h>
36 #endif /* USE_PROCFS */
39 + struct ptrace_io_desc piod;
41 + piod.piod_op = PIOD_READ_D;
42 + piod.piod_offs = (void *)addr;
43 + piod.piod_addr = laddr;
44 + piod.piod_len = len;
46 + if (ptrace(PT_IO, tcp->pid, (char *)&piod, sizeof(piod)) < 0) {
55 @@ -1079,6 +1097,14 @@
56 pread(tcp->pfd_reg, ®s, sizeof(regs), 0);
61 + if (ptrace(PTRACE_GETREGS, tcp->pid, (char *) ®s, 0) < 0) {
62 + perror("getpc: ptrace(PTRACE_GETREGS, ...)");