]> granicus.if.org Git - strace/commitdiff
Change number of personalities for Linux sparc to 2
authorWichert Akkerman <wichert@deephackmode.org>
Sun, 18 Apr 1999 22:50:50 +0000 (22:50 +0000)
committerWichert Akkerman <wichert@deephackmode.org>
Sun, 18 Apr 1999 22:50:50 +0000 (22:50 +0000)
Minor other fixes

NEWS
defs.h
file.c
syscall.c

diff --git a/NEWS b/NEWS
index e36b772000034fa1cfa90058742325c1583af5a1..ac8a3fef00286c37a9a4009cb7edd95fcedd8fc6 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,5 @@
-Changes in 4.0
-==============
+Changes in 3.99
+===============
 * New maintainer
 * add support for more Linux architectures (powerpc, sparc, arm)
 * support lots more Linux syscalls
diff --git a/defs.h b/defs.h
index 4dcef2090ec9bec77da7470800738852969308b2..b7a1d182eaa52859c940a6e93cf8c8426159d109 100644 (file)
--- a/defs.h
+++ b/defs.h
  *     $Id$
  */
 
+#ifdef linux
+#include <features.h>
+#endif
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -104,7 +108,7 @@ extern int ptrace();
 #endif /* !SVR4 */
 
 #ifdef LINUX
-#if !defined(LINUXSPARC) || !defined(__GLIBC__)
+#if !defined(__GLIBC__)
 #define        PTRACE_PEEKUSER PTRACE_PEEKUSR
 #define        PTRACE_POKEUSER PTRACE_POKEUSR
 #endif
@@ -124,7 +128,7 @@ extern int ptrace();
 #include <linux/a.out.h>
 #include <asm/psr.h>
 #undef  SUPPORTED_PERSONALITIES
-#define SUPPORTED_PERSONALITIES 3
+#define SUPPORTED_PERSONALITIES 2
 #endif /* LINUXSPARC */
 
 /* Trace Control Block */
diff --git a/file.c b/file.c
index 458cb1af14ef4a72d1fc442a7637bc2dfeb27941..9040ebfe6611ec63d45b1a05e037b096cf2c87a8 100644 (file)
--- a/file.c
+++ b/file.c
@@ -457,7 +457,7 @@ int addr;
        else
                tprintf("...}");
 }
-#endif
+#endif /* LINUXSPARC */
 
 static void
 realprintstat(tcp, statbuf)
index 70e516ea811916b65d67a66d94553b860a052f6f..045ad278952a90a9344db1e486e26535721a80bd 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -1038,6 +1038,9 @@ struct tcb *tcp;
                int i;
                tcp->u_nargs = sysent[tcp->scno].nargs;
                for (i = 0; i < tcp->u_nargs; i++) {
+                       /* WTA: if scno is out-of-bounds this will bomb. Add range-check
+                        * for scno somewhere above here!
+                        */
                        if (upeek(pid, REG_A0+i, &tcp->u_arg[i]) < 0)
                                return -1;
                }