1139731Simp/*-
21543Srgrimes * Copyright (c) 1992, 1993
31543Srgrimes *	The Regents of the University of California.  All rights reserved.
41543Srgrimes *
51543Srgrimes * Redistribution and use in source and binary forms, with or without
61543Srgrimes * modification, are permitted provided that the following conditions
71543Srgrimes * are met:
81543Srgrimes * 1. Redistributions of source code must retain the above copyright
91543Srgrimes *    notice, this list of conditions and the following disclaimer.
101543Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
111543Srgrimes *    notice, this list of conditions and the following disclaimer in the
121543Srgrimes *    documentation and/or other materials provided with the distribution.
131543Srgrimes * 4. Neither the name of the University nor the names of its contributors
141543Srgrimes *    may be used to endorse or promote products derived from this software
151543Srgrimes *    without specific prior written permission.
161543Srgrimes *
171543Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
181543Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
191543Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
201543Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
211543Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
221543Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
231543Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
241543Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
251543Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
261543Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
271543Srgrimes * SUCH DAMAGE.
281543Srgrimes *
291543Srgrimes *	@(#)ptrace.h	8.1 (Berkeley) 6/11/93
3050477Speter * $FreeBSD: releng/10.3/sys/x86/include/ptrace.h 286311 2015-08-05 08:17:10Z kib $
311543Srgrimes */
321543Srgrimes
3313611Speter#ifndef _MACHINE_PTRACE_H_
3413611Speter#define _MACHINE_PTRACE_H_
3513611Speter
36230426Skib#define	__HAVE_PTRACE_MACHDEP
37230426Skib
38232520Stijl/*
39232520Stijl * On amd64 (PT_FIRSTMACH + 0) and (PT_FIRSTMACH + 1) are old values for
40279211Sjhb * PT_GETXSTATE_OLD and PT_SETXSTATE_OLD.  They should not be (re)used.
41232520Stijl */
42230426Skib
43235563Sjhb#ifdef __i386__
44235563Sjhb#define	PT_GETXMMREGS	(PT_FIRSTMACH + 0)
45235563Sjhb#define	PT_SETXMMREGS	(PT_FIRSTMACH + 1)
46235563Sjhb#endif
47279211Sjhb#ifdef _KERNEL
48279211Sjhb#define	PT_GETXSTATE_OLD (PT_FIRSTMACH + 2)
49279211Sjhb#define	PT_SETXSTATE_OLD (PT_FIRSTMACH + 3)
50279211Sjhb#endif
51279211Sjhb#define	PT_GETXSTATE_INFO (PT_FIRSTMACH + 4)
52279211Sjhb#define	PT_GETXSTATE	(PT_FIRSTMACH + 5)
53279211Sjhb#define	PT_SETXSTATE	(PT_FIRSTMACH + 6)
54286311Skib#define	PT_GETFSBASE	(PT_FIRSTMACH + 7)
55286311Skib#define	PT_SETFSBASE	(PT_FIRSTMACH + 8)
56286311Skib#define	PT_GETGSBASE	(PT_FIRSTMACH + 9)
57286311Skib#define	PT_SETGSBASE	(PT_FIRSTMACH + 10)
58232520Stijl
59279211Sjhb/* Argument structure for PT_GETXSTATE_INFO. */
60279211Sjhbstruct ptrace_xstate_info {
61279211Sjhb	uint64_t	xsave_mask;
62279211Sjhb	uint32_t	xsave_len;
63279211Sjhb};
64279211Sjhb
6555205Speter#endif
66