ptrace.h revision 286311
1296435Spfg/*- 2276881Sbapt * Copyright (c) 1992, 1993 31573Srgrimes * The Regents of the University of California. All rights reserved. 41573Srgrimes * 51573Srgrimes * Redistribution and use in source and binary forms, with or without 61573Srgrimes * modification, are permitted provided that the following conditions 71573Srgrimes * are met: 81573Srgrimes * 1. Redistributions of source code must retain the above copyright 91573Srgrimes * notice, this list of conditions and the following disclaimer. 101573Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 111573Srgrimes * notice, this list of conditions and the following disclaimer in the 121573Srgrimes * documentation and/or other materials provided with the distribution. 131573Srgrimes * 4. Neither the name of the University nor the names of its contributors 141573Srgrimes * may be used to endorse or promote products derived from this software 151573Srgrimes * without specific prior written permission. 161573Srgrimes * 171573Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 18148834Sstefanf * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 191573Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 201573Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 211573Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 221573Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 231573Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 241573Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 251573Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 261573Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 271573Srgrimes * SUCH DAMAGE. 281573Srgrimes * 291573Srgrimes * @(#)ptrace.h 8.1 (Berkeley) 6/11/93 301573Srgrimes * $FreeBSD: stable/10/sys/x86/include/ptrace.h 286311 2015-08-05 08:17:10Z kib $ 311573Srgrimes */ 321573Srgrimes 331573Srgrimes#ifndef _MACHINE_PTRACE_H_ 341573Srgrimes#define _MACHINE_PTRACE_H_ 3584260Sobrien 361573Srgrimes#define __HAVE_PTRACE_MACHDEP 371573Srgrimes 381573Srgrimes/* 391573Srgrimes * On amd64 (PT_FIRSTMACH + 0) and (PT_FIRSTMACH + 1) are old values for 401573Srgrimes * PT_GETXSTATE_OLD and PT_SETXSTATE_OLD. They should not be (re)used. 411573Srgrimes */ 4284260Sobrien 431573Srgrimes#ifdef __i386__ 441573Srgrimes#define PT_GETXMMREGS (PT_FIRSTMACH + 0) 451573Srgrimes#define PT_SETXMMREGS (PT_FIRSTMACH + 1) 4684260Sobrien#endif 4784260Sobrien#ifdef _KERNEL 4884260Sobrien#define PT_GETXSTATE_OLD (PT_FIRSTMACH + 2) 491573Srgrimes#define PT_SETXSTATE_OLD (PT_FIRSTMACH + 3) 50276881Sbapt#endif 51276881Sbapt#define PT_GETXSTATE_INFO (PT_FIRSTMACH + 4) 52296435Spfg#define PT_GETXSTATE (PT_FIRSTMACH + 5) 53296435Spfg#define PT_SETXSTATE (PT_FIRSTMACH + 6) 541573Srgrimes#define PT_GETFSBASE (PT_FIRSTMACH + 7) 55276881Sbapt#define PT_SETFSBASE (PT_FIRSTMACH + 8) 561573Srgrimes#define PT_GETGSBASE (PT_FIRSTMACH + 9) 57148834Sstefanf#define PT_SETGSBASE (PT_FIRSTMACH + 10) 58148834Sstefanf 59148834Sstefanf/* Argument structure for PT_GETXSTATE_INFO. */ 60148834Sstefanfstruct ptrace_xstate_info { 61276881Sbapt uint64_t xsave_mask; 62296435Spfg uint32_t xsave_len; 63276881Sbapt}; 64296435Spfg 651573Srgrimes#endif 66296435Spfg