diff options
author | Wichert Akkerman <wichert@deephackmode.org> | 1999-08-29 23:15:44 +0000 |
---|---|---|
committer | Wichert Akkerman <wichert@deephackmode.org> | 1999-08-29 23:15:44 +0000 |
commit | 122ee5522d683cadca2a9900204be1d479545e78 (patch) | |
tree | bdadcae9810b8d41471d7f0d3acf1ac4c6fbc069 | |
parent | c9a293fbf24873da278cd5402b531370aee02469 (diff) | |
download | strace-obsolete/v4.0.1.tar.gz |
Catch up on a email-backlog, prepare for 4.0.1 releaseobsolete/v4.0.1
-rw-r--r-- | ChangeLog | 16 | ||||
-rw-r--r-- | configure.in | 3 | ||||
-rw-r--r-- | linux/sparc/syscall.h | 1 | ||||
-rw-r--r-- | signal.c | 9 | ||||
-rw-r--r-- | syscall.c | 34 | ||||
-rw-r--r-- | system.c | 15 | ||||
-rw-r--r-- | util.c | 22 |
7 files changed, 68 insertions, 32 deletions
@@ -1,3 +1,19 @@ +Mon Aug 30 00:53:57 CEST 1999 Wichert Akkerman <wakkerma@debian.org> + + * Merge patch from Daniel Jacobowitz: KERN_JAVA_* and KERN_SECURELVL aren't + defined for all kernelversions + +Thu Aug 19 13:10:15 CEST 1999 Jakub Jelinek <jj@ultra.linux.cz> + + * linux/sparc/syscall.h: Declare create_module/init_module. + * configure.in: Allow compilation in a different directory + than the source one. + * signal.c: Use asm/reg.h and struct regs instead of pt_regs + so that we don't depend on asm/ptrace.h which clashes with + glibc sys/ptrace.h. + * util.c: Likewise. + * syscall.c: Likewise. + Wed Aug 4 18:01:50 CEST 1999 Wichert Akkerman <wakkerma@debian.org> * Syscall 94 on Linux alpha is sys_poll diff --git a/configure.in b/configure.in index af1e492a8..fbf36f63f 100644 --- a/configure.in +++ b/configure.in @@ -130,4 +130,7 @@ AC_CHECK_HEADERS(sys/reg.h sys/filio.h sys/acl.h sys/asynch.h sys/door.h sys/str AC_DECL_SYS_ERRLIST AC_DECL_SYS_SIGLIST AC_DECL__SYS_SIGLIST +if test ! -d $osarch; then + mkdir -p $osarch +fi AC_OUTPUT(Makefile $osarch/Makefile) diff --git a/linux/sparc/syscall.h b/linux/sparc/syscall.h index 1857f9015..6ee1ace50 100644 --- a/linux/sparc/syscall.h +++ b/linux/sparc/syscall.h @@ -99,6 +99,7 @@ int sys_sigaltstack(), sys_rt_sigprocmask(), sys_rt_sigaction(); int sys_rt_sigpending(), sys_rt_sigsuspend(), sys_rt_sigqueueinfo(); int sys_rt_sigtimedwait(), sys_prctl(), sys_poll(); int sys_sendfile(), sys_query_module(), sys_capget(), sys_capset(); +int sys_create_module(), sys_init_module(); int sys_umask(); /* XXX */ @@ -54,8 +54,9 @@ #ifdef HAVE_ASM_SIGCONTEXT_H #include <asm/sigcontext.h> #ifdef SPARC +#include <asm/reg.h> typedef struct { - struct pt_regs si_regs; + struct regs si_regs; int si_mask; } m_siginfo_t; #endif @@ -778,18 +779,16 @@ struct tcb *tcp; #else #ifdef SPARC long i1; - struct pt_regs regs; + struct regs regs; m_siginfo_t si; if(ptrace(PTRACE_GETREGS, tcp->pid, (char *)®s, 0) < 0) { perror("sigreturn: PTRACE_GETREGS "); return 0; } - memmove (®s.u_regs [1], ®s.u_regs [0], - sizeof (regs.u_regs) - sizeof (regs.u_regs [0])); if(entering(tcp)) { tcp->u_arg[0] = 0; - i1 = regs.u_regs[UREG_I1]; + i1 = regs.r_o1; if(umove(tcp, i1, &si) < 0) { perror("sigreturn: umove "); return 0; @@ -38,6 +38,10 @@ #include <sys/syscall.h> #include <sys/param.h> +#if defined(LINUX) && defined(SPARC) +#include <asm/reg.h> +#endif + #ifdef HAVE_SYS_REG_H #include <sys/reg.h> # define PTRACE_PEEKUSR PTRACE_PEEKUSER @@ -579,7 +583,7 @@ struct tcb *tcp; long r0; long a3; #elif defined (SPARC) - struct pt_regs regs; + struct regs regs; unsigned long trap; #endif #endif /* LINUX */ @@ -650,14 +654,11 @@ struct tcb *tcp; if (ptrace(PTRACE_GETREGS,pid,(char *)®s,0) < 0) return -1; - memmove (®s.u_regs [1], ®s.u_regs [0], - sizeof (regs.u_regs) - sizeof (regs.u_regs [0])); - /* If we are entering, then disassemble the syscall trap. */ if (!(tcp->flags & TCB_INSYSCALL)) { /* Retrieve the syscall trap instruction. */ errno = 0; - trap = ptrace(PTRACE_PEEKTEXT,pid,(char *)regs.pc,0); + trap = ptrace(PTRACE_PEEKTEXT,pid,(char *)regs.r_pc,0); if (errno) return -1; @@ -693,7 +694,7 @@ struct tcb *tcp; tcp->flags &= ~TCB_WAITEXECVE; return 0; } - fprintf(stderr,"syscall: unknown syscall trap %08x %08x\n", trap, regs.pc); + fprintf(stderr,"syscall: unknown syscall trap %08x %08x\n", trap, regs.r_pc); return -1; } @@ -701,10 +702,10 @@ struct tcb *tcp; if (trap == 0x91d02027) scno = 156; else - scno = regs.u_regs[UREG_G1]; + scno = regs.r_g1; if (scno == 0) { - scno = regs.u_regs[UREG_I0]; - memmove (®s.u_regs[UREG_I0], ®s.u_regs[UREG_I1], 7*sizeof(regs.u_regs[0])); + scno = regs.r_o0; + memmove (®s.r_o0, ®s.r_o1, 7*sizeof(regs.r_o0)); } } #endif @@ -858,12 +859,12 @@ struct tcb *tcp; } #else /* !ALPHA */ #ifdef SPARC - if (regs.psr & PSR_C) { + if (regs.r_psr & PSR_C) { tcp->u_rval = -1; - u_error = regs.u_regs[UREG_I0]; + u_error = regs.r_o0; } else { - tcp->u_rval = regs.u_regs[UREG_I0]; + tcp->u_rval = regs.r_o0; u_error = 0; } #endif /* SPARC */ @@ -1074,12 +1075,11 @@ struct tcb *tcp; } #elif defined (SPARC) { - int i, offset; + int i; - offset = UREG_I0; tcp->u_nargs = sysent[tcp->scno].nargs; for (i = 0; i < tcp->u_nargs; i++) - tcp->u_arg[i] = regs.u_regs[offset + i]; + tcp->u_arg[i] = *((®s.r_o0) + i); } #else { @@ -1292,10 +1292,10 @@ struct tcb *tcp; #ifdef LINUX #ifdef SPARC - struct pt_regs regs; + struct regs regs; if (ptrace(PTRACE_GETREGS,tcp->pid,(char *)®s,0) < 0) return -1; - val = regs.u_regs[UREG_I1]; + val = regs.r_o1; #endif /* SPARC */ #endif /* LINUX */ @@ -1279,11 +1279,19 @@ static struct xlat sysctl_kern[] = { { KERN_PROF, "KERN_PROF" }, { KERN_NODENAME, "KERN_NODENAME" }, { KERN_DOMAINNAME, "KERN_DOMAINNAME" }, +#ifdef KERN_SECURELVL { KERN_SECURELVL, "KERN_SECURELVL" }, +#endif { KERN_PANIC, "KERN_PANIC" }, +#ifdef KERN_REALROOTDEV { KERN_REALROOTDEV, "KERN_REALROOTDEV" }, +#endif +#ifdef KERN_JAVA_INTERPRETER { KERN_JAVA_INTERPRETER, "KERN_JAVA_INTERPRETER" }, +#endif +#ifdef KERN_JAVA_APPLETVIEWER { KERN_JAVA_APPLETVIEWER, "KERN_JAVA_APPLETVIEWER" }, +#endif { KERN_SPARC_REBOOT, "KERN_SPARC_REBOOT" }, { KERN_CTLALTDEL, "KERN_CTLALTDEL" }, { KERN_PRINTK, "KERN_PRINTK" }, @@ -1562,8 +1570,13 @@ struct tcb *tcp; && ((name[0] == CTL_KERN && (name[1] == KERN_OSRELEASE || name[1] == KERN_OSTYPE +#ifdef KERN_JAVA_INTERPRETER || name[1] == KERN_JAVA_INTERPRETER - || name[1] == KERN_JAVA_APPLETVIEWER)))) { +#endif +#ifdef KERN_JAVA_APPLETVIEWER + || name[1] == KERN_JAVA_APPLETVIEWER +#endif + )))) { printpath(tcp, (size_t)info.oldval); tprintf(", %d, ", oldlen); if (info.newval == 0) @@ -57,7 +57,11 @@ #include <sys/utsname.h> #endif /* SUNOS4_KERNEL_ARCH_KLUDGE */ -#if defined(LINUX) && defined(SPARC) && !defined(__GLIBC__) +#if defined(LINUX) && defined(SPARC) + +#include <asm/reg.h> + +#if !defined(__GLIBC__) #include <linux/unistd.h> @@ -95,6 +99,8 @@ static _hack_syscall5(int,_ptrace,int,__request,int,__pid,int,__addr,int,__data, #endif +#endif + /* macros */ #ifndef MAX #define MAX(a,b) (((a) > (b)) ? (a) : (b)) @@ -878,10 +884,10 @@ struct tcb *tcp; return -1; #else /* !ALPHA */ #ifdef SPARC - struct pt_regs regs; + struct regs regs; if (ptrace(PTRACE_GETREGS,tcp->pid,(char *)®s,0) < 0) return -1; - pc = regs.pc; + pc = regs.r_pc; #endif /* SPARC */ #endif /* ALPHA */ #endif /* !M68K */ @@ -955,12 +961,12 @@ struct tcb *tcp; tprintf("[%08lx] ", pc); #else /* !ALPHA */ #ifdef SPARC - struct pt_regs regs; + struct regs regs; if (ptrace(PTRACE_GETREGS,tcp->pid,(char *)®s,0) < 0) { tprintf("[????????] "); return; } - tprintf("[%08lx] ", regs.pc); + tprintf("[%08lx] ", regs.r_pc); #endif /* SPARC */ #endif /* ALPHA */ #endif /* !M68K */ @@ -997,7 +1003,7 @@ struct tcb *tcp; #ifdef SPARC /* We simply use the SunOS breakpoint code. */ - struct pt_regs regs; + struct regs regs; #define LOOPA 0x30800000 /* ba,a 0 */ if (tcp->flags & TCB_BPTSET) { @@ -1008,9 +1014,7 @@ struct tcb *tcp; perror("setbpt: ptrace(PTRACE_GETREGS, ...)"); return -1; } - memmove (®s.u_regs [1], ®s.u_regs [0], - sizeof (regs.u_regs) - sizeof (regs.u_regs [0])); - tcp->baddr = regs.u_regs[UREG_I7] + 8; + tcp->baddr = regs.r_o7 + 8; errno = 0; tcp->inst[0] = ptrace(PTRACE_PEEKTEXT, tcp->pid, (char *)tcp->baddr, 0); if(errno) { |