From owner-p4-projects@FreeBSD.ORG Tue May 24 20:57:47 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 645BD16A420; Tue, 24 May 2005 20:57:47 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3987816A41C for ; Tue, 24 May 2005 20:57:47 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0CE9543D48 for ; Tue, 24 May 2005 20:57:47 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j4OKvkXw093828 for ; Tue, 24 May 2005 20:57:46 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j4OKvkKe093825 for perforce@freebsd.org; Tue, 24 May 2005 20:57:46 GMT (envelope-from peter@freebsd.org) Date: Tue, 24 May 2005 20:57:46 GMT Message-Id: <200505242057.j4OKvkKe093825@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 77408 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2005 20:57:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=77408 Change 77408 by peter@peter_melody on 2005/05/24 20:57:17 Even more evil. Affected files ... .. //depot/projects/hammer/sys/kern/sys_process.c#23 edit .. //depot/projects/hammer/sys/sys/ptrace.h#8 edit Differences ... ==== //depot/projects/hammer/sys/kern/sys_process.c#23 (text+ko) ==== @@ -32,6 +32,8 @@ #include __FBSDID("$FreeBSD: src/sys/kern/sys_process.c,v 1.130 2005/03/18 21:22:28 das Exp $"); +#include "opt_compat.h" + #include #include #include @@ -56,7 +58,9 @@ #include #ifdef COMPAT_IA32 -#include +#include +#include +#include extern struct sysentvec ia32_freebsd_sysvec; #endif @@ -102,52 +106,28 @@ proc_read_regs(struct thread *td, struct reg *regs) { -#ifdef COMPAT_IA32 - if (td->td_proc->p_sysent == &ia32_freebsd_sysvec && - curthread->td_proc->p_sysent == &ia32_freebsd_sysvec) - PROC_ACTION(fill_regs32(td, regs)); - else -#endif - PROC_ACTION(fill_regs(td, regs)); + PROC_ACTION(fill_regs(td, regs)); } int proc_write_regs(struct thread *td, struct reg *regs) { -#ifdef COMPAT_IA32 - if (td->td_proc->p_sysent == &ia32_freebsd_sysvec && - curthread->td_proc->p_sysent == &ia32_freebsd_sysvec) - PROC_ACTION(set_regs32(td, regs)); - else -#endif - PROC_ACTION(set_regs(td, regs)); + PROC_ACTION(set_regs(td, regs)); } int proc_read_dbregs(struct thread *td, struct dbreg *dbregs) { -#ifdef COMPAT_IA32 - if (td->td_proc->p_sysent == &ia32_freebsd_sysvec && - curthread->td_proc->p_sysent == &ia32_freebsd_sysvec) - PROC_ACTION(fill_dbregs32(td, dbregs)); - else -#endif - PROC_ACTION(fill_dbregs(td, dbregs)); + PROC_ACTION(fill_dbregs(td, dbregs)); } int proc_write_dbregs(struct thread *td, struct dbreg *dbregs) { -#ifdef COMPAT_IA32 - if (td->td_proc->p_sysent == &ia32_freebsd_sysvec && - curthread->td_proc->p_sysent == &ia32_freebsd_sysvec) - PROC_ACTION(set_dbregs32(td, dbregs)); - else -#endif - PROC_ACTION(set_dbregs(td, dbregs)); + PROC_ACTION(set_dbregs(td, dbregs)); } /* @@ -158,27 +138,59 @@ proc_read_fpregs(struct thread *td, struct fpreg *fpregs) { -#ifdef COMPAT_IA32 - if (td->td_proc->p_sysent == &ia32_freebsd_sysvec && - curthread->td_proc->p_sysent == &ia32_freebsd_sysvec) - PROC_ACTION(fill_fpregs32(td, fpregs)); - else -#endif - PROC_ACTION(fill_fpregs(td, fpregs)); + PROC_ACTION(fill_fpregs(td, fpregs)); } int proc_write_fpregs(struct thread *td, struct fpreg *fpregs) { + PROC_ACTION(set_fpregs(td, fpregs)); +} + #ifdef COMPAT_IA32 - if (td->td_proc->p_sysent == &ia32_freebsd_sysvec && - curthread->td_proc->p_sysent == &ia32_freebsd_sysvec) - PROC_ACTION(set_fpregs32(td, fpregs)); - else +int +proc_read_regs32(struct thread *td, struct reg32 *regs32) +{ + + PROC_ACTION(fill_regs32(td, regs32)); +} + +int +proc_write_regs32(struct thread *td, struct reg32 *regs32) +{ + + PROC_ACTION(set_regs32(td, regs32)); +} + +int +proc_read_dbregs32(struct thread *td, struct dbreg32 *dbregs32) +{ + + PROC_ACTION(fill_dbregs32(td, dbregs32)); +} + +int +proc_write_dbregs32(struct thread *td, struct dbreg32 *dbregs32) +{ + + PROC_ACTION(set_dbregs32(td, dbregs32)); +} + +int +proc_read_fpregs32(struct thread *td, struct fpreg32 *fpregs32) +{ + + PROC_ACTION(fill_fpregs32(td, fpregs32)); +} + +int +proc_write_fpregs32(struct thread *td, struct fpreg32 *fpregs32) +{ + + PROC_ACTION(set_fpregs32(td, fpregs32)); +} #endif - PROC_ACTION(set_fpregs(td, fpregs)); -} int proc_sstep(struct thread *td) ==== //depot/projects/hammer/sys/sys/ptrace.h#8 (text+ko) ==== @@ -135,6 +135,17 @@ int proc_write_dbregs(struct thread *_td, struct dbreg *_dbreg); int proc_sstep(struct thread *_td); int proc_rwmem(struct proc *_p, struct uio *_uio); +#ifdef COMPAT_IA32 +struct reg32; +struct fpreg32; +struct dbreg32; +int proc_read_regs32(struct thread *_td, struct reg32 *_reg32); +int proc_write_regs32(struct thread *_td, struct reg32 *_reg32); +int proc_read_fpregs32(struct thread *_td, struct fpreg32 *_fpreg32); +int proc_write_fpregs32(struct thread *_td, struct fpreg32 *_fpreg32); +int proc_read_dbregs32(struct thread *_td, struct dbreg32 *_dbreg32); +int proc_write_dbregs32(struct thread *_td, struct dbreg32 *_dbreg32); +#endif #else /* !_KERNEL */ #include