From: Wichert Akkerman Date: Wed, 28 Mar 2001 20:29:17 +0000 (+0000) Subject: several Linux/sparc fixes X-Git-Tag: v4.5.18~1064 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=00a82eed2b1b7989a8659390c23b8a87425f235d;p=strace several Linux/sparc fixes --- diff --git a/ChangeLog b/ChangeLog index 5f8c24eb..a0c90228 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2001-03-28 Wichert Akkerman + + * 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 * linux/sparc/ioctlent.h: updated using new Linux ioctl setup diff --git a/configure.in b/configure.in index 71b26ddc..4baf06f0 100644 --- a/configure.in +++ b/configure.in @@ -47,7 +47,7 @@ ia64) m68k) arch=m68k ;; -sparc) +sparc*) arch=sparc ;; mips*) diff --git a/linux/sparc/syscall.h b/linux/sparc/syscall.h index 6ee1ace5..24616aed 100644 --- a/linux/sparc/syscall.h +++ b/linux/sparc/syscall.h @@ -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(); diff --git a/process.c b/process.c index d2697cd4..efa125f2 100644 --- a/process.c +++ b/process.c @@ -53,6 +53,20 @@ #include #endif +#if HAVE_ASM_REG_H +#ifdef SPARC +# define fpq kernel_fpq +# define fq kernel_fq +# define fpu kernel_fpu +#endif +#include +#ifdef SPARC +# undef fpq +# undef fq +# undef fpu +#endif +#endif /* HAVE_ASM_REG_H */ + #ifdef HAVE_SYS_REG_H # include #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*)®s, 0)<0) return -1; - reg.r_g1=new; + regs.r_g1=new; if (ptrace(PTRACE_SETREGS, tcp->pid, (char*)®s, 0)<0) return -1; return 0; diff --git a/signal.c b/signal.c index 082f5c77..6051d8ff 100644 --- a/signal.c +++ b/signal.c @@ -63,15 +63,29 @@ # include #endif /* !IA64 */ -#ifdef HAVE_ASM_SIGCONTEXT_H -#include +#if HAVE_ASM_REG_H #ifdef SPARC +# define fpq kernel_fpq +# define fq kernel_fq +# define fpu kernel_fpu +#endif #include +#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 +#endif /* SPARC */ #else /* !HAVE_ASM_SIGCONTEXT_H */ #ifdef I386 struct sigcontext_struct { diff --git a/syscall.c b/syscall.c index ffd8f658..39cc0260 100644 --- a/syscall.c +++ b/syscall.c @@ -43,7 +43,17 @@ #include #if HAVE_ASM_REG_H +#ifdef SPARC +# define fpq kernel_fpq +# define fq kernel_fq +# define fpu kernel_fpu +#endif #include +#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;