]> git.saurik.com Git - apple/xnu.git/blobdiff - libsyscall/custom/__ptrace.s
xnu-4903.241.1.tar.gz
[apple/xnu.git] / libsyscall / custom / __ptrace.s
index 9eae221f2c235ee09b03cf3e96d2670187ce27cf..607a26e876bcc7ed71b555343257a46ee0bb7e71 100644 (file)
@@ -36,7 +36,7 @@
 LEAF(___ptrace, 0)
        xorl    %eax,%eax
        REG_TO_EXTERN(%eax,_errno)
-UNIX_SYSCALL_NONAME(ptrace, 4)
+       UNIX_SYSCALL_NONAME(ptrace, 4, cerror)
        ret
 
 #elif defined(__x86_64__)
@@ -47,9 +47,28 @@ LEAF(___ptrace, 0)
        xorq    %rax,%rax
        PICIFY(_errno)
        movl    %eax,(%r11)
-UNIX_SYSCALL_NONAME(ptrace, 4)
+       UNIX_SYSCALL_NONAME(ptrace, 4, cerror)
        ret
 
+#elif defined(__arm__)
+
+MI_ENTRY_POINT(___ptrace)
+       MI_GET_ADDRESS(ip,_errno)
+       str     r8, [sp, #-4]!
+       mov     r8, #0
+       str     r8, [ip]
+       ldr     r8, [sp], #4    
+       SYSCALL_NONAME(ptrace, 4, cerror)
+       bx              lr
+
+#elif defined(__arm64__)
+
+MI_ENTRY_POINT(___ptrace)
+       MI_GET_ADDRESS(x9,_errno)
+       str             wzr, [x9]
+       SYSCALL_NONAME(ptrace, 4, cerror)
+       ret
+       
 #else
 #error Unsupported architecture
 #endif