]> granicus.if.org Git - strace/commitdiff
several Linux/sparc fixes
authorWichert Akkerman <wichert@deephackmode.org>
Wed, 28 Mar 2001 20:29:17 +0000 (20:29 +0000)
committerWichert Akkerman <wichert@deephackmode.org>
Wed, 28 Mar 2001 20:29:17 +0000 (20:29 +0000)
ChangeLog
configure.in
linux/sparc/syscall.h
process.c
signal.c
syscall.c

index 5f8c24eb55e619ce3caaf999d0e353b92adcf85f..a0c902285a1cfe126f63b1dfbc633da640760928 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2001-03-28  Wichert Akkerman <wakkerma@debian.org>
+
+  * configure.in: use sparc* so we can compile on sparc64 as well
+  * process.c, syscall.c: work around double define of fpq, fq and fpu
+    structs on Linux/sparc, and use regs instead of pt_regs
+  * don't use asm/sigcontext.h on Linux/sparc
+
 2001-03-28  Wichert Akkerman <wakkerma@debian.org>
 
   * linux/sparc/ioctlent.h: updated using new Linux ioctl setup
index 71b26ddcda33d75c21fd1bc2c9c21a432c33d776..4baf06f0533518c322087aec73b42cc5020bc769 100644 (file)
@@ -47,7 +47,7 @@ ia64)
 m68k)
        arch=m68k
        ;;
-sparc)
+sparc*)
        arch=sparc
        ;;
 mips*)
index 6ee1ace5047114fc1ccd06d4b270c58399c604ff..24616aeda5bda67ff01c4987ed233555c21d6a62 100644 (file)
@@ -36,7 +36,7 @@ int   sys_errsys();
 /* 1.1 processes and protection */
 int    sys_gethostid(),sys_sethostname(),sys_gethostname(),sys_getpid();
 int    sys_setdomainname(),sys_getdomainname();
-int    sys_fork(),sys_exit(),sys_execv(),sys_execve(),sys_wait4(),sys_waitpid();
+int    sys_fork(),sys_clone(),sys_exit(),sys_execv(),sys_execve(),sys_wait4(),sys_waitpid();
 int    sys_setuid(),sys_setgid(),sys_getuid(),sys_setreuid(),sys_getgid(),sys_getgroups(),sys_setregid(),sys_setgroups();
 int    sys_getpgrp(),sys_setpgrp();
 int    sys_setsid(), sys_setpgid();
@@ -45,7 +45,7 @@ int   sys_uname(), sys_sysinfo();
 /* 1.2 memory management */
 int    sys_brk(),sys_sbrk(),sys_sstk();
 int    sys_getpagesize(),sys_mmap(),sys_mctl(),sys_munmap(),sys_mprotect(),sys_mincore(), sys_mremap();
-int    sys_omsync(),sys_omadvise();
+int    sys_omsync(),sys_omadvise(), sys_madvise(),sys_mlockall();
 
 /* 1.3 signals */
 int    sys_sigvec(),sys_sigblock(),sys_sigsetmask(),sys_sigpause(),sys_sigstack(),sys_sigcleanup(), sys_sigreturn();
@@ -66,7 +66,7 @@ int   sys_oldquota(), sys_quotactl();
 int    sys_rtschedule(), sys_personality();
 
 /* 1.7 system operation support */
-int    sys_mount(),sys_unmount(),sys_swapon();
+int    sys_mount(),sys_unmount(),sys_swapon(),sys_pivotroot();
 int    sys_sync(),sys_reboot();
 int    sys_sysacct();
 int    sys_auditsys();
index d2697cd48645f4f051d54a1eca4263ab73e2d3aa..efa125f20c951afe164c1cca17a026900739ba08 100644 (file)
--- a/process.c
+++ b/process.c
 #include <sys/ptrace.h>
 #endif
 
+#if HAVE_ASM_REG_H
+#ifdef SPARC
+#  define fpq kernel_fpq
+#  define fq kernel_fq
+#  define fpu kernel_fpu
+#endif
+#include <asm/reg.h>
+#ifdef SPARC
+#  undef fpq
+#  undef fq
+#  undef fpu 
+#endif
+#endif /* HAVE_ASM_REG_H */
+
 #ifdef HAVE_SYS_REG_H
 # include <sys/reg.h>
 #ifndef PTRACE_PEEKUSR
@@ -460,10 +474,10 @@ int new;
                return -1;
        return 0;
 #elif defined(SPARC)
-       struct pt_regs regs;
+       struct regs regs;
        if (ptrace(PTRACE_GETREGS, tcp->pid, (char*)&regs, 0)<0)
                return -1;
-       reg.r_g1=new;
+       regs.r_g1=new;
        if (ptrace(PTRACE_SETREGS, tcp->pid, (char*)&regs, 0)<0)
                return -1;
        return 0;
index 082f5c777c76596ef4485bc9dad65fecd899f85f..6051d8ff144ee738e505461ac6cf39d24f8d887e 100644 (file)
--- a/signal.c
+++ b/signal.c
 # include <asm/ptrace_offsets.h>
 #endif /* !IA64 */
 
-#ifdef HAVE_ASM_SIGCONTEXT_H
-#include <asm/sigcontext.h>
+#if HAVE_ASM_REG_H
 #ifdef SPARC
+#  define fpq kernel_fpq
+#  define fq kernel_fq
+#  define fpu kernel_fpu
+#endif
 #include <asm/reg.h>
+#ifdef SPARC
+#  undef fpq
+#  undef fq
+#  undef fpu 
+#endif
+
+#endif /* HAVE_ASM_REG_H */
+#ifdef HAVE_ASM_SIGCONTEXT_H
+#ifdef SPARC
 typedef struct {
        struct regs             si_regs;
        int                     si_mask;
 } m_siginfo_t;
-#endif
+#else
+#include <asm/sigcontext.h>
+#endif /* SPARC */
 #else /* !HAVE_ASM_SIGCONTEXT_H */
 #ifdef I386
 struct sigcontext_struct {
index ffd8f658215f91e4e46feef1e88cc8bd9c467d9b..39cc026020bc7730d8cc7a25146ea94303440b8e 100644 (file)
--- a/syscall.c
+++ b/syscall.c
 #include <sys/param.h>
 
 #if HAVE_ASM_REG_H
+#ifdef SPARC
+#  define fpq kernel_fpq
+#  define fq kernel_fq
+#  define fpu kernel_fpu
+#endif
 #include <asm/reg.h>
+#ifdef SPARC
+#  undef fpq
+#  undef fq
+#  undef fpu 
+#endif
 #endif
 
 #ifdef HAVE_SYS_REG_H
@@ -625,7 +635,7 @@ struct tcb *tcp;
        static long r0;
        static long a3;
 #elif defined (SPARC)
-       static struct pt_regs regs;
+       static struct regs regs;
        static unsigned long trap;
 #elif defined(MIPS)
        static long a3;