procfs_fpregs.c (168759) | procfs_fpregs.c (189282) |
---|---|
1/*- 2 * Copyright (c) 1993 Jan-Simon Pendry 3 * Copyright (c) 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * Jan-Simon Pendry. 8 * --- 20 unchanged lines hidden (view full) --- 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)procfs_fpregs.c 8.2 (Berkeley) 6/15/94 34 * 35 * From: 36 * $Id: procfs_regs.c,v 3.2 1993/12/15 09:40:17 jsp Exp $ | 1/*- 2 * Copyright (c) 1993 Jan-Simon Pendry 3 * Copyright (c) 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * Jan-Simon Pendry. 8 * --- 20 unchanged lines hidden (view full) --- 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)procfs_fpregs.c 8.2 (Berkeley) 6/15/94 34 * 35 * From: 36 * $Id: procfs_regs.c,v 3.2 1993/12/15 09:40:17 jsp Exp $ |
37 * $FreeBSD: head/sys/fs/procfs/procfs_fpregs.c 168759 2007-04-15 13:29:36Z des $ | 37 * $FreeBSD: head/sys/fs/procfs/procfs_fpregs.c 189282 2009-03-02 18:43:50Z kib $ |
38 */ 39 40#include "opt_compat.h" 41 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/lock.h> 45#include <sys/mutex.h> 46#include <sys/proc.h> 47#include <sys/ptrace.h> | 38 */ 39 40#include "opt_compat.h" 41 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/lock.h> 45#include <sys/mutex.h> 46#include <sys/proc.h> 47#include <sys/ptrace.h> |
48#include <sys/sysent.h> |
|
48#include <sys/uio.h> 49 50#include <machine/reg.h> 51 52#include <fs/pseudofs/pseudofs.h> 53#include <fs/procfs/procfs.h> 54 55#ifdef COMPAT_IA32 56#include <sys/procfs.h> 57#include <machine/fpu.h> 58#include <compat/ia32/ia32_reg.h> 59 | 49#include <sys/uio.h> 50 51#include <machine/reg.h> 52 53#include <fs/pseudofs/pseudofs.h> 54#include <fs/procfs/procfs.h> 55 56#ifdef COMPAT_IA32 57#include <sys/procfs.h> 58#include <machine/fpu.h> 59#include <compat/ia32/ia32_reg.h> 60 |
60extern struct sysentvec ia32_freebsd_sysvec; | |
61/* 62 * PROC(write, fpregs, td2, &r) becomes 63 * proc_write_fpregs(td2, &r) or 64 * proc_write_fpregs32(td2, &r32) 65 * 66 * UIOMOVE_FROMBUF(r, uio) becomes 67 * uiomove_frombuf(&r, sizeof(r), uio) or 68 * uiomove_frombuf(&r32, sizeof(r32), uio) --- 28 unchanged lines hidden (view full) --- 97 if (p_candebug(td, p)) { 98 PROC_UNLOCK(p); 99 return (EPERM); 100 } 101 102 /* XXXKSE: */ 103 td2 = FIRST_THREAD_IN_PROC(p); 104#ifdef COMPAT_IA32 | 61/* 62 * PROC(write, fpregs, td2, &r) becomes 63 * proc_write_fpregs(td2, &r) or 64 * proc_write_fpregs32(td2, &r32) 65 * 66 * UIOMOVE_FROMBUF(r, uio) becomes 67 * uiomove_frombuf(&r, sizeof(r), uio) or 68 * uiomove_frombuf(&r32, sizeof(r32), uio) --- 28 unchanged lines hidden (view full) --- 97 if (p_candebug(td, p)) { 98 PROC_UNLOCK(p); 99 return (EPERM); 100 } 101 102 /* XXXKSE: */ 103 td2 = FIRST_THREAD_IN_PROC(p); 104#ifdef COMPAT_IA32 |
105 if (td->td_proc->p_sysent == &ia32_freebsd_sysvec) { 106 if (td2->td_proc->p_sysent != &ia32_freebsd_sysvec) { | 105 if (SV_CURPROC_FLAG(SV_ILP32)) { 106 if ((td2->td_proc->p_sysent->sv_flags & SV_ILP32) == 0) { |
107 PROC_UNLOCK(p); 108 return (EINVAL); 109 } 110 wrap32 = 1; 111 } 112#endif 113 error = PROC(read, fpregs, td2, &r); 114 if (error == 0) { --- 15 unchanged lines hidden --- | 107 PROC_UNLOCK(p); 108 return (EINVAL); 109 } 110 wrap32 = 1; 111 } 112#endif 113 error = PROC(read, fpregs, td2, &r); 114 if (error == 0) { --- 15 unchanged lines hidden --- |