diff options
author | Juan Cespedes <cespedes@debian.org> | 2002-03-31 20:01:28 +0200 |
---|---|---|
committer | Juan Cespedes <cespedes@debian.org> | 2002-03-31 20:01:28 +0200 |
commit | 5bfb061c4c7cfac6e1882a586cf36c849d95fcea (patch) | |
tree | e124f503c83891e56c06ec7ad2b458809b9cef53 /sysdeps/linux-gnu | |
parent | f1bfe203f5f1c0e11a614f9d593a68406f5cb47e (diff) | |
download | ltrace-5bfb061c4c7cfac6e1882a586cf36c849d95fcea.tar.gz |
Version 0.3.25
* Finally added powerpc support (Anton Blanchard <anton@samba.org>)
Diffstat (limited to 'sysdeps/linux-gnu')
-rw-r--r-- | sysdeps/linux-gnu/ppc/arch.h | 2 | ||||
-rw-r--r-- | sysdeps/linux-gnu/ppc/regs.c | 2 | ||||
-rw-r--r-- | sysdeps/linux-gnu/ppc/syscallent.h | 14 | ||||
-rw-r--r-- | sysdeps/linux-gnu/ppc/trace.c | 8 |
4 files changed, 19 insertions, 7 deletions
diff --git a/sysdeps/linux-gnu/ppc/arch.h b/sysdeps/linux-gnu/ppc/arch.h index e04fe5b..72fa45f 100644 --- a/sysdeps/linux-gnu/ppc/arch.h +++ b/sysdeps/linux-gnu/ppc/arch.h @@ -1,3 +1,3 @@ -#define BREAKPOINT_VALUE { 0xf7, 0xe0, 0x00, 0x08 } +#define BREAKPOINT_VALUE { 0x7f, 0xe0, 0x00, 0x08 } #define BREAKPOINT_LENGTH 4 #define DECR_PC_AFTER_BREAK 0 diff --git a/sysdeps/linux-gnu/ppc/regs.c b/sysdeps/linux-gnu/ppc/regs.c index 1eb51e5..193bb75 100644 --- a/sysdeps/linux-gnu/ppc/regs.c +++ b/sysdeps/linux-gnu/ppc/regs.c @@ -31,5 +31,5 @@ get_stack_pointer(pid_t pid) { void * get_return_addr(pid_t pid, void * stack_pointer) { - return (void *)ptrace(PTRACE_PEEKTEXT, pid, 4*PT_LNK, 0); + return (void *)ptrace(PTRACE_PEEKUSER, pid, 4*PT_LNK, 0); } diff --git a/sysdeps/linux-gnu/ppc/syscallent.h b/sysdeps/linux-gnu/ppc/syscallent.h index 40c8ba1..acbb4bc 100644 --- a/sysdeps/linux-gnu/ppc/syscallent.h +++ b/sysdeps/linux-gnu/ppc/syscallent.h @@ -206,3 +206,17 @@ "madvise", /* 205 */ "mincore", /* 206 */ "gettid", /* 207 */ + "tkill", /* 208 */ + "setxattr", /* 209 */ + "lsetxattr", /* 210 */ + "fsetxattr", /* 211 */ + "getxattr", /* 212 */ + "lgetxattr", /* 213 */ + "fgetxattr", /* 214 */ + "listxattr", /* 215 */ + "llistxattr", /* 216 */ + "flistxattr", /* 217 */ + "removexattr", /* 218 */ + "lremovexattr", /* 219 */ + "fremovexattr", /* 220 */ + "futex", /* 221 */ diff --git a/sysdeps/linux-gnu/ppc/trace.c b/sysdeps/linux-gnu/ppc/trace.c index 8e4135f..9634d1d 100644 --- a/sysdeps/linux-gnu/ppc/trace.c +++ b/sysdeps/linux-gnu/ppc/trace.c @@ -28,14 +28,12 @@ syscall_p(struct process * proc, int status, int * sysnum) { int insn = ptrace(PTRACE_PEEKTEXT, proc->pid, pc-4, 0); if (insn == SYSCALL_INSN) { - *sysnum = ptrace(PTRACE_PEEKUSER, proc->pid, 4*PT_RO, 0); + *sysnum = ptrace(PTRACE_PEEKUSER, proc->pid, 4*PT_R0, 0); if (proc->callstack_depth > 0 && proc->callstack[proc->callstack_depth-1].is_syscall) { return 2; } - if (*sysnum >= 0 && *sysnum <= 255) { - return 1; - } + return 1; } } return 0; @@ -51,7 +49,7 @@ gimme_arg(enum tof type, struct process * proc, int arg_num) { if (arg_num < 8) { return ptrace(PTRACE_PEEKUSER, proc->pid, 4*(arg_num+PT_R3), 0); } else { - return ptrace(PTRACE_PEEKDATA, proc->pid, proc->stack_pointer+4*(arg_num-8), 0); /* Check */ + return ptrace(PTRACE_PEEKDATA, proc->pid, proc->stack_pointer+8*(arg_num-8), 0); } } else { fprintf(stderr, "gimme_arg called with wrong arguments\n"); |