From 85d610d6a16113794e9e4b9345e80187e84e059d Mon Sep 17 00:00:00 2001 From: des Date: Fri, 15 Mar 2002 20:17:12 +0000 Subject: PT_[GS]ET{,DB,FP}REGS isn't really optional any more, since we have dummy backend functions for those archs that don't support them. I meant to do this ages ago, but never got around to it. Inspired by: OpenBSD --- sys/kern/sys_process.c | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) (limited to 'sys/kern/sys_process.c') diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index e15f191..e6af165 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -394,24 +394,12 @@ ptrace(struct thread *td, struct ptrace_args *uap) case PT_KILL: case PT_STEP: case PT_DETACH: -#ifdef PT_GETREGS case PT_GETREGS: -#endif -#ifdef PT_SETREGS case PT_SETREGS: -#endif -#ifdef PT_GETFPREGS case PT_GETFPREGS: -#endif -#ifdef PT_SETFPREGS case PT_SETFPREGS: -#endif -#ifdef PT_GETDBREGS case PT_GETDBREGS: -#endif -#ifdef PT_SETDBREGS case PT_SETDBREGS: -#endif /* not being traced... */ if ((p->p_flag & P_TRACED) == 0) { PROC_UNLOCK(p); @@ -584,7 +572,6 @@ ptrace(struct thread *td, struct ptrace_args *uap) uap->data = SIGKILL; goto sendsig; /* in PT_CONTINUE above */ -#ifdef PT_SETREGS case PT_SETREGS: error = copyin(uap->addr, &r.reg, sizeof r.reg); if (error == 0) { @@ -593,9 +580,7 @@ ptrace(struct thread *td, struct ptrace_args *uap) PRELE(p); } return (error); -#endif /* PT_SETREGS */ -#ifdef PT_GETREGS case PT_GETREGS: PHOLD(p); error = proc_read_regs(td2, &r.reg); @@ -603,9 +588,7 @@ ptrace(struct thread *td, struct ptrace_args *uap) if (error == 0) error = copyout(&r.reg, uap->addr, sizeof r.reg); return (error); -#endif /* PT_SETREGS */ -#ifdef PT_SETFPREGS case PT_SETFPREGS: error = copyin(uap->addr, &r.fpreg, sizeof r.fpreg); if (error == 0) { @@ -614,9 +597,7 @@ ptrace(struct thread *td, struct ptrace_args *uap) PRELE(p); } return (error); -#endif /* PT_SETFPREGS */ -#ifdef PT_GETFPREGS case PT_GETFPREGS: PHOLD(p); error = proc_read_fpregs(td2, &r.fpreg); @@ -624,9 +605,7 @@ ptrace(struct thread *td, struct ptrace_args *uap) if (error == 0) error = copyout(&r.fpreg, uap->addr, sizeof r.fpreg); return (error); -#endif /* PT_SETFPREGS */ -#ifdef PT_SETDBREGS case PT_SETDBREGS: error = copyin(uap->addr, &r.dbreg, sizeof r.dbreg); if (error == 0) { @@ -635,9 +614,7 @@ ptrace(struct thread *td, struct ptrace_args *uap) PRELE(p); } return (error); -#endif /* PT_SETDBREGS */ - -#ifdef PT_GETDBREGS + case PT_GETDBREGS: PHOLD(p); error = proc_read_dbregs(td2, &r.dbreg); @@ -645,7 +622,6 @@ ptrace(struct thread *td, struct ptrace_args *uap) if (error == 0) error = copyout(&r.dbreg, uap->addr, sizeof r.dbreg); return (error); -#endif /* PT_SETDBREGS */ default: KASSERT(0, ("unreachable code\n")); -- cgit v1.1