]> granicus.if.org Git - strace/commitdiff
CRIS: Correct first argument to upeek()
authorEdgar E. Iglesias <edgar.iglesias@gmail.com>
Mon, 5 Oct 2009 14:41:02 +0000 (14:41 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 5 Oct 2009 14:57:06 +0000 (14:57 +0000)
This complements commit ea0e6e80260d2b1b7ad40282012b0e47869bcddf.
* syscall.c [CRISV10 || CRISV32] (syscall_fixup, syscall_enter): Pass
tcp pointer instead of pid to upeek().
* util.c [CRISV10 || CRISV32] (printcall): Likewise.

Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
syscall.c
util.c

index 26b1a9d71e58b37ed6967e993ed1cc20488c5ebd..a2e688555bddb459544f1c8366dc44b36b141fa9 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -1504,7 +1504,7 @@ syscall_fixup(struct tcb *tcp)
                return 0;
        }
 #elif defined(CRISV10) || defined(CRISV32)
-       if (upeek(tcp->pid, 4*PT_R10, &r10) < 0)
+       if (upeek(tcp, 4*PT_R10, &r10) < 0)
                return -1;
        if (r10 != -ENOSYS && !(tcp->flags & TCB_INSYSCALL)) {
                if (debug)
@@ -2227,7 +2227,7 @@ syscall_enter(struct tcb *tcp)
                else
                        tcp->u_nargs = 0;
                for (i = 0; i < tcp->u_nargs; i++) {
-                       if (upeek(tcp->pid, crisregs[i], &tcp->u_arg[i]) < 0)
+                       if (upeek(tcp, crisregs[i], &tcp->u_arg[i]) < 0)
                                return -1;
                }
        }
diff --git a/util.c b/util.c
index f41b0c39c93caa38832eaa7e883f47692f314149..c767065e0bf8986f59c89f9f28ed982640b7d4db 100644 (file)
--- a/util.c
+++ b/util.c
@@ -1362,7 +1362,7 @@ printcall(struct tcb *tcp)
 #elif defined(CRISV10)
        long pc;
 
-       if (upeek(tcp->pid, 4*PT_IRP, &pc) < 0) {
+       if (upeek(tcp, 4*PT_IRP, &pc) < 0) {
                PRINTBADPC;
                return;
        }
@@ -1370,7 +1370,7 @@ printcall(struct tcb *tcp)
 #elif defined(CRISV32)
        long pc;
 
-       if (upeek(tcp->pid, 4*PT_ERP, &pc) < 0) {
+       if (upeek(tcp, 4*PT_ERP, &pc) < 0) {
                PRINTBADPC;
                return;
        }