2008-11-13  Kirill A. Shutemov  <[EMAIL PROTECTED]>

        Fix compilation warnings on ARM.
        * signal.c (sys_sigreturn) [ARM]: Fix cast.
        * syscall.c (decode_subcall) Do not define on ARM EABI.
        (get_scno) [ARM]: Fix cast.
        (syscall_fixup, syscall_enter): Do not define pid variable on ARM.

--- signal.c
+++ signal.c
@@ -1242,7 +1242,7 @@ struct tcb *tcp;
        if (entering(tcp)) {
                tcp->u_arg[0] = 0;
 
-               if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, (void *)&regs) == -1)
+               if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, (unsigned 
long)&regs) == -1)
                        return 0;
 
                if (umove(tcp, regs.ARM_sp, &sc) < 0)
--- syscall.c
+++ syscall.c
@@ -582,7 +582,7 @@ static const struct subcall subcalls_table[] = {
 };
 #endif /* FREEBSD */
 
-#if !(defined(LINUX) && ( defined(ALPHA) || defined(MIPS) ))
+#if !(defined(LINUX) && ( defined(ALPHA) || defined(MIPS) || 
defined(__ARM_EABI__) ))
 
 static void
 decode_subcall(tcp, subcall, nsubcalls, style)
@@ -1006,7 +1006,7 @@ struct tcb *tcp;
        /*
         * Read complete register set in one go.
         */
-       if (ptrace(PTRACE_GETREGS, pid, NULL, (void *)&regs) == -1)
+       if (ptrace(PTRACE_GETREGS, pid, NULL, (unsigned long)&regs) == -1)
                return -1;
 
        /*
@@ -1034,7 +1034,7 @@ struct tcb *tcp;
                         * Get the ARM-mode system call number
                         */
                        errno = 0;
-                       scno = ptrace(PTRACE_PEEKTEXT, pid, (void 
*)(regs.ARM_pc - 4), NULL);
+                       scno = ptrace(PTRACE_PEEKTEXT, pid, (void 
*)(regs.ARM_pc - 4), 0);
                        if (errno)
                                return -1;
 
@@ -1342,7 +1342,9 @@ syscall_fixup(tcp)
 struct tcb *tcp;
 {
 #ifndef USE_PROCFS
+#ifndef ARM
        int pid = tcp->pid;
+#endif
 #else /* USE_PROCFS */
        int scno = known_scno(tcp);
 
@@ -1956,9 +1958,9 @@ static int
 syscall_enter(tcp)
 struct tcb *tcp;
 {
-#ifndef USE_PROCFS
+#if !defined(USE_PROCFS) && !defined(ARM)
        int pid = tcp->pid;
-#endif /* !USE_PROCFS */
+#endif /* !USE_PROCFS && !ARM */
 #ifdef LINUX
 #if defined(S390) || defined(S390X)
        {


-- 
ldv

Attachment: pgpJwJQ8WwpRa.pgp
Description: PGP signature

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to