1*deef986eSanton /* $OpenBSD: ptrace.h,v 1.2 2024/11/27 05:25:57 anton Exp $ */ 2f5df1827Smickey /* $NetBSD: ptrace.h,v 1.1 2003/04/26 18:39:47 fvdl Exp $ */ 3f5df1827Smickey 4f5df1827Smickey /* 5f5df1827Smickey * Copyright (c) 1993 Christopher G. Demetriou 6f5df1827Smickey * All rights reserved. 7f5df1827Smickey * 8f5df1827Smickey * Redistribution and use in source and binary forms, with or without 9f5df1827Smickey * modification, are permitted provided that the following conditions 10f5df1827Smickey * are met: 11f5df1827Smickey * 1. Redistributions of source code must retain the above copyright 12f5df1827Smickey * notice, this list of conditions and the following disclaimer. 13f5df1827Smickey * 2. Redistributions in binary form must reproduce the above copyright 14f5df1827Smickey * notice, this list of conditions and the following disclaimer in the 15f5df1827Smickey * documentation and/or other materials provided with the distribution. 16f5df1827Smickey * 3. All advertising materials mentioning features or use of this software 17f5df1827Smickey * must display the following acknowledgement: 18f5df1827Smickey * This product includes software developed by Christopher G. Demetriou. 19f5df1827Smickey * 4. The name of the author may not be used to endorse or promote products 20f5df1827Smickey * derived from this software without specific prior written permission 21f5df1827Smickey * 22f5df1827Smickey * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 23f5df1827Smickey * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 24f5df1827Smickey * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 25f5df1827Smickey * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 26f5df1827Smickey * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 27f5df1827Smickey * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28f5df1827Smickey * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29f5df1827Smickey * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30f5df1827Smickey * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 31f5df1827Smickey * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32f5df1827Smickey */ 33f5df1827Smickey 34f5df1827Smickey /* 35f5df1827Smickey * i386-dependent ptrace definitions 36f5df1827Smickey */ 37f5df1827Smickey #define PT_STEP (PT_FIRSTMACH + 0) 38f5df1827Smickey #define PT_GETREGS (PT_FIRSTMACH + 1) 39f5df1827Smickey #define PT_SETREGS (PT_FIRSTMACH + 2) 40f5df1827Smickey #define PT_GETFPREGS (PT_FIRSTMACH + 3) 41f5df1827Smickey #define PT_SETFPREGS (PT_FIRSTMACH + 4) 42*deef986eSanton 43*deef986eSanton #define PT_GETXSTATE_INFO (PT_FIRSTMACH + 5) 44*deef986eSanton #define PT_GETXSTATE (PT_FIRSTMACH + 6) 45*deef986eSanton #define PT_SETXSTATE (PT_FIRSTMACH + 7) 46*deef986eSanton 47*deef986eSanton struct ptrace_xstate_info { 48*deef986eSanton uint64_t xsave_mask; 49*deef986eSanton uint32_t xsave_len; 50*deef986eSanton }; 51*deef986eSanton 52*deef986eSanton #ifdef _KERNEL 53*deef986eSanton int process_read_xstate_info(struct proc *, void *); 54*deef986eSanton int process_read_xstate(struct proc *, void *); 55*deef986eSanton int process_write_xstate(struct proc *, void *); 56*deef986eSanton #endif 57