]> granicus.if.org Git - strace/commitdiff
2004-02-26 Andreas Schwab <schwab@suse.de>
authorRoland McGrath <roland@redhat.com>
Mon, 1 Mar 2004 20:30:48 +0000 (20:30 +0000)
committerRoland McGrath <roland@redhat.com>
Mon, 1 Mar 2004 20:30:48 +0000 (20:30 +0000)
* defs.h [LINUX && IA64]: Declare getrval2 also on IA64.
* net.c (sys_pipe) [LINUX && IA64]: For IA64 use the two return values.
* syscall.c (getrval2) [LINUX && IA64]: Implement for IA64.

defs.h
net.c
syscall.c

diff --git a/defs.h b/defs.h
index 7641e67d5c343a652964418db0c3c3139c0ec6ae..6d22d34f2c08d0e4b609088576a617c8d6f73bff 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -484,7 +484,7 @@ extern void tv_div P((struct timeval *, struct timeval *, int));
 #ifdef SUNOS4
 extern int fixvfork P((struct tcb *));
 #endif
-#if !(defined(LINUX) && !defined(SPARC))
+#if !(defined(LINUX) && !defined(SPARC) && !defined(IA64))
 extern long getrval2 P((struct tcb *));
 #endif
 #ifdef USE_PROCFS
diff --git a/net.c b/net.c
index 7dcd2866630744cf73e97ee93f7623289b433c22..e986a42772c143212b38a9ab66bd5ff0a47f60a4 100644 (file)
--- a/net.c
+++ b/net.c
@@ -1166,7 +1166,7 @@ sys_pipe(tcp)
 struct tcb *tcp;
 {
 
-#if defined(LINUX) && !defined(SPARC) && !defined(SH)
+#if defined(LINUX) && !defined(SPARC) && !defined(SH) && !defined(IA64)
        int fds[2];
 
        if (exiting(tcp)) {
@@ -1179,7 +1179,7 @@ struct tcb *tcp;
                else
                        tprintf("[%u, %u]", fds[0], fds[1]);
        }
-#elif defined(SPARC) || defined(SH) || defined(SVR4) || defined(FREEBSD)
+#elif defined(SPARC) || defined(SH) || defined(SVR4) || defined(FREEBSD) || defined(IA64)
        if (exiting(tcp))
                tprintf("[%lu, %lu]", tcp->u_rval, getrval2(tcp));
 #endif
index d2981b7ba8a20fcce1282f11c562a74e65c400a8..214e38bba9a5711b80da38ef673c9cabd52768c7 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -2432,6 +2432,9 @@ struct tcb *tcp;
        if (upeek(tcp->pid, 4*(REG_REG0+1), &val) < 0)
                return -1;
 #endif /* SPARC */
+#elif defined(IA64)
+       if (upeek(tcp->pid, PT_R9, &val) < 0)
+               return -1;
 #endif /* LINUX */
 
 #ifdef SUNOS4