diff options
author | Eric Andersen <andersen@codepoet.org> | 2004-07-15 07:34:00 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2004-07-15 07:34:00 +0000 |
commit | 71150804d1ac8ed2f7b9c6d3025fd415c58b129e (patch) | |
tree | aab8c892a813847614070f73e711178cd3c9ec74 /libc/sysdeps/linux/h8300/ptrace.c | |
parent | 255fbb6abcef56c5f8c36383d49a902686f258f5 (diff) |
h8300 updates from Yoshinori Sato
Diffstat (limited to 'libc/sysdeps/linux/h8300/ptrace.c')
-rw-r--r-- | libc/sysdeps/linux/h8300/ptrace.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/libc/sysdeps/linux/h8300/ptrace.c b/libc/sysdeps/linux/h8300/ptrace.c index 64fb7bc96..7ce1b277e 100644 --- a/libc/sysdeps/linux/h8300/ptrace.c +++ b/libc/sysdeps/linux/h8300/ptrace.c @@ -1,24 +1,15 @@ #include <errno.h> #include <asm/ptrace.h> -#include <sys/syscall.h> -#include <stdarg.h> +#include <asm/unistd.h> int -ptrace(int request, ... /* int pid, int addr, int data */) +ptrace(int request, int pid, int addr, int data) { - long ret; - long res; - int pid,addr,data; - va_list ap; + int ret; + int res; - va_start(ap,request); - pid = va_arg(ap,int); - addr = va_arg(ap,int); - data = va_arg(ap,int); - va_end(ap); - - if (request > 0 && request < 4) (long *)data = &ret; + if (request > 0 && request < 4) data = (int)&ret; __asm__ volatile ("sub.l er0,er0\n\t" "mov.b %1,r0l\n\t" @@ -30,7 +21,8 @@ ptrace(int request, ... /* int pid, int addr, int data */) "mov.l er0,%0" :"=g" (res) :"i" (__NR_ptrace), "g" (request), "g" (pid), - "g" (addr), "g" (data) : "er0", "er1", "er2", "er3", "er4"); + "g" (addr), "g" (data) + : "er0", "er1", "er2", "er3", "er4"); if (res >= 0) { if (request > 0 && request < 4) { |