]> granicus.if.org Git - strace/commitdiff
2003-03-04 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@redhat.com>
Wed, 5 Mar 2003 06:29:06 +0000 (06:29 +0000)
committerRoland McGrath <roland@redhat.com>
Wed, 5 Mar 2003 06:29:06 +0000 (06:29 +0000)
* syscall.c (get_scno) [IA64]: Do TCB_WAITEXECVE check only when
TCB_INSYSCALL is clear, like other platforms do.

syscall.c

index bb118693a94cb3362b79ae00371dca279b053d75..9814a4378f366fd6c6975f59acc44e52f4aa9227 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -919,11 +919,15 @@ struct tcb *tcp;
                if (ia32) {
                        if (upeek(pid, PT_R1, &scno) < 0)       /* orig eax */
                                return -1;
-                       /* Check if we return from execve. */
                } else {
                        if (upeek (pid, PT_R15, &scno) < 0)
                                return -1;
                }
+               /* Check if we return from execve. */
+               if (tcp->flags & TCB_WAITEXECVE) {
+                       tcp->flags &= ~TCB_WAITEXECVE;
+                       return 0;
+               }
        } else {
                /* syscall in progress */
                if (upeek (pid, PT_R8, &r8) < 0)
@@ -931,11 +935,6 @@ struct tcb *tcp;
                if (upeek (pid, PT_R10, &r10) < 0)
                        return -1;
        }
-       if (tcp->flags & TCB_WAITEXECVE) {
-               tcp->flags &= ~TCB_WAITEXECVE;
-               return 0;
-       }
-
 #elif defined (ARM)
        {
            long pc;