1d8a02332STijl Coosemans /*- 251369649SPedro F. Giffuni * SPDX-License-Identifier: BSD-3-Clause 351369649SPedro F. Giffuni * 4d8a02332STijl Coosemans * Copyright (c) 1992, 1993 5d8a02332STijl Coosemans * The Regents of the University of California. All rights reserved. 6d8a02332STijl Coosemans * 7d8a02332STijl Coosemans * Redistribution and use in source and binary forms, with or without 8d8a02332STijl Coosemans * modification, are permitted provided that the following conditions 9d8a02332STijl Coosemans * are met: 10d8a02332STijl Coosemans * 1. Redistributions of source code must retain the above copyright 11d8a02332STijl Coosemans * notice, this list of conditions and the following disclaimer. 12d8a02332STijl Coosemans * 2. Redistributions in binary form must reproduce the above copyright 13d8a02332STijl Coosemans * notice, this list of conditions and the following disclaimer in the 14d8a02332STijl Coosemans * documentation and/or other materials provided with the distribution. 15fbbd9655SWarner Losh * 3. Neither the name of the University nor the names of its contributors 16d8a02332STijl Coosemans * may be used to endorse or promote products derived from this software 17d8a02332STijl Coosemans * without specific prior written permission. 18d8a02332STijl Coosemans * 19d8a02332STijl Coosemans * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20d8a02332STijl Coosemans * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21d8a02332STijl Coosemans * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22d8a02332STijl Coosemans * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23d8a02332STijl Coosemans * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24d8a02332STijl Coosemans * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25d8a02332STijl Coosemans * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26d8a02332STijl Coosemans * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27d8a02332STijl Coosemans * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28d8a02332STijl Coosemans * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29d8a02332STijl Coosemans * SUCH DAMAGE. 30d8a02332STijl Coosemans */ 31d8a02332STijl Coosemans 32d8a02332STijl Coosemans #ifndef _MACHINE_PTRACE_H_ 33d8a02332STijl Coosemans #define _MACHINE_PTRACE_H_ 34d8a02332STijl Coosemans 35d8a02332STijl Coosemans #define __HAVE_PTRACE_MACHDEP 36d8a02332STijl Coosemans 37d8a02332STijl Coosemans /* 38d8a02332STijl Coosemans * On amd64 (PT_FIRSTMACH + 0) and (PT_FIRSTMACH + 1) are old values for 39180e57e5SJohn Baldwin * PT_GETXSTATE_OLD and PT_SETXSTATE_OLD. They should not be (re)used. 40d8a02332STijl Coosemans */ 41d8a02332STijl Coosemans 42da65bfacSJohn Baldwin #ifdef __i386__ 43da65bfacSJohn Baldwin #define PT_GETXMMREGS (PT_FIRSTMACH + 0) 44da65bfacSJohn Baldwin #define PT_SETXMMREGS (PT_FIRSTMACH + 1) 45da65bfacSJohn Baldwin #endif 46180e57e5SJohn Baldwin #ifdef _KERNEL 47180e57e5SJohn Baldwin #define PT_GETXSTATE_OLD (PT_FIRSTMACH + 2) 48180e57e5SJohn Baldwin #define PT_SETXSTATE_OLD (PT_FIRSTMACH + 3) 49180e57e5SJohn Baldwin #endif 50180e57e5SJohn Baldwin #define PT_GETXSTATE_INFO (PT_FIRSTMACH + 4) 51180e57e5SJohn Baldwin #define PT_GETXSTATE (PT_FIRSTMACH + 5) 52180e57e5SJohn Baldwin #define PT_SETXSTATE (PT_FIRSTMACH + 6) 5318170237SKonstantin Belousov #define PT_GETFSBASE (PT_FIRSTMACH + 7) 5418170237SKonstantin Belousov #define PT_SETFSBASE (PT_FIRSTMACH + 8) 5518170237SKonstantin Belousov #define PT_GETGSBASE (PT_FIRSTMACH + 9) 5618170237SKonstantin Belousov #define PT_SETGSBASE (PT_FIRSTMACH + 10) 57*7171e591SKonstantin Belousov #define PT_GETTLSBASE (PT_FIRSTMACH + 11) 58*7171e591SKonstantin Belousov #define PT_SETTLSBASE (PT_FIRSTMACH + 12) 59180e57e5SJohn Baldwin 60180e57e5SJohn Baldwin /* Argument structure for PT_GETXSTATE_INFO. */ 61180e57e5SJohn Baldwin struct ptrace_xstate_info { 62180e57e5SJohn Baldwin uint64_t xsave_mask; 63180e57e5SJohn Baldwin uint32_t xsave_len; 64180e57e5SJohn Baldwin }; 65d8a02332STijl Coosemans 66d8a02332STijl Coosemans #endif 67