linux_ptrace.c (172207) | linux_ptrace.c (208833) |
---|---|
1/*- 2 * Copyright (c) 2001 Alexander Kabaev 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2001 Alexander Kabaev 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/i386/linux/linux_ptrace.c 172207 2007-09-17 05:31:39Z jeff $"); | 30__FBSDID("$FreeBSD: head/sys/i386/linux/linux_ptrace.c 208833 2010-06-05 15:59:59Z kib $"); |
31 32#include "opt_cpu.h" 33 34#include <sys/param.h> 35#include <sys/lock.h> 36#include <sys/mutex.h> 37#include <sys/proc.h> 38#include <sys/ptrace.h> --- 180 unchanged lines hidden (view full) --- 219#ifdef CPU_ENABLE_SSE 220static int 221linux_proc_read_fpxregs(struct thread *td, struct linux_pt_fpxreg *fpxregs) 222{ 223 224 PROC_LOCK_ASSERT(td->td_proc, MA_OWNED); 225 if (cpu_fxsr == 0 || (td->td_proc->p_flag & P_INMEM) == 0) 226 return (EIO); | 31 32#include "opt_cpu.h" 33 34#include <sys/param.h> 35#include <sys/lock.h> 36#include <sys/mutex.h> 37#include <sys/proc.h> 38#include <sys/ptrace.h> --- 180 unchanged lines hidden (view full) --- 219#ifdef CPU_ENABLE_SSE 220static int 221linux_proc_read_fpxregs(struct thread *td, struct linux_pt_fpxreg *fpxregs) 222{ 223 224 PROC_LOCK_ASSERT(td->td_proc, MA_OWNED); 225 if (cpu_fxsr == 0 || (td->td_proc->p_flag & P_INMEM) == 0) 226 return (EIO); |
227 bcopy(&td->td_pcb->pcb_save.sv_xmm, fpxregs, sizeof(*fpxregs)); | 227 bcopy(&td->td_pcb->pcb_user_save.sv_xmm, fpxregs, sizeof(*fpxregs)); |
228 return (0); 229} 230 231static int 232linux_proc_write_fpxregs(struct thread *td, struct linux_pt_fpxreg *fpxregs) 233{ 234 235 PROC_LOCK_ASSERT(td->td_proc, MA_OWNED); 236 if (cpu_fxsr == 0 || (td->td_proc->p_flag & P_INMEM) == 0) 237 return (EIO); | 228 return (0); 229} 230 231static int 232linux_proc_write_fpxregs(struct thread *td, struct linux_pt_fpxreg *fpxregs) 233{ 234 235 PROC_LOCK_ASSERT(td->td_proc, MA_OWNED); 236 if (cpu_fxsr == 0 || (td->td_proc->p_flag & P_INMEM) == 0) 237 return (EIO); |
238 bcopy(fpxregs, &td->td_pcb->pcb_save.sv_xmm, sizeof(*fpxregs)); | 238 bcopy(fpxregs, &td->td_pcb->pcb_user_save.sv_xmm, sizeof(*fpxregs)); |
239 return (0); 240} 241#endif 242 243int 244linux_ptrace(struct thread *td, struct linux_ptrace_args *uap) 245{ 246 union { --- 240 unchanged lines hidden --- | 239 return (0); 240} 241#endif 242 243int 244linux_ptrace(struct thread *td, struct linux_ptrace_args *uap) 245{ 246 union { --- 240 unchanged lines hidden --- |