xref: /netbsd-src/sys/arch/ia64/include/ptrace.h (revision a8778fd7dceeb2067eb383963ab85934d4fc885a)
1*a8778fd7Skamil /*	$NetBSD: ptrace.h,v 1.5 2019/06/18 21:18:12 kamil Exp $	*/
2ba7cbe76Scherry 
3ba7cbe76Scherry /*
4ba7cbe76Scherry  * Copyright (c) 1994 Christopher G. Demetriou
5ba7cbe76Scherry  * All rights reserved.
6ba7cbe76Scherry  *
7ba7cbe76Scherry  * Redistribution and use in source and binary forms, with or without
8ba7cbe76Scherry  * modification, are permitted provided that the following conditions
9ba7cbe76Scherry  * are met:
10ba7cbe76Scherry  * 1. Redistributions of source code must retain the above copyright
11ba7cbe76Scherry  *    notice, this list of conditions and the following disclaimer.
12ba7cbe76Scherry  * 2. Redistributions in binary form must reproduce the above copyright
13ba7cbe76Scherry  *    notice, this list of conditions and the following disclaimer in the
14ba7cbe76Scherry  *    documentation and/or other materials provided with the distribution.
15ba7cbe76Scherry  * 3. All advertising materials mentioning features or use of this software
16ba7cbe76Scherry  *    must display the following acknowledgement:
17ba7cbe76Scherry  *      This product includes software developed by Christopher G. Demetriou.
18ba7cbe76Scherry  * 4. The name of the author may not be used to endorse or promote products
19ba7cbe76Scherry  *    derived from this software without specific prior written permission
20ba7cbe76Scherry  *
21ba7cbe76Scherry  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22ba7cbe76Scherry  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23ba7cbe76Scherry  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24ba7cbe76Scherry  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25ba7cbe76Scherry  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26ba7cbe76Scherry  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27ba7cbe76Scherry  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28ba7cbe76Scherry  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29ba7cbe76Scherry  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30ba7cbe76Scherry  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31ba7cbe76Scherry  */
32ba7cbe76Scherry 
33ba7cbe76Scherry /*
34ba7cbe76Scherry  * IA64 dependent ptrace definitions.
35ba7cbe76Scherry  */
36ba7cbe76Scherry #define	PT_STEP		(PT_FIRSTMACH + 0)
37ba7cbe76Scherry #define	PT_GETREGS	(PT_FIRSTMACH + 1)
38ba7cbe76Scherry #define	PT_SETREGS	(PT_FIRSTMACH + 2)
39ba7cbe76Scherry #define	PT_GETFPREGS	(PT_FIRSTMACH + 3)
40ba7cbe76Scherry #define	PT_SETFPREGS	(PT_FIRSTMACH + 4)
4105ffc73cSkamil #define	PT_SETSTEP	(PT_FIRSTMACH + 5)
4205ffc73cSkamil #define	PT_CLEARSTEP	(PT_FIRSTMACH + 6)
43ebb5deb7Sskrll 
44ebb5deb7Sskrll #define PT_MACHDEP_STRINGS \
45ebb5deb7Sskrll 	"PT_STEP", \
46ebb5deb7Sskrll 	"PT_GETREGS", \
47ebb5deb7Sskrll 	"PT_SETREGS", \
48ebb5deb7Sskrll 	"PT_GETFPREGS", \
4905ffc73cSkamil 	"PT_SETFPREGS", \
5005ffc73cSkamil 	"PT_SETSTEP", \
5105ffc73cSkamil 	"PT_CLEARSTEP",
525020ab68Schristos 
535020ab68Schristos #include <machine/reg.h>
545020ab68Schristos #define PTRACE_REG_PC(r)	(r)->r_special.iip
55*a8778fd7Skamil #define PTRACE_REG_FP(r)	0 /* Not supported in target */
565020ab68Schristos #define PTRACE_REG_SET_PC(r, v)	(r)->r_special.iip = (v)
575020ab68Schristos #define PTRACE_REG_SP(r)	(r)->r_special.sp
585020ab68Schristos #ifdef notyet
595020ab68Schristos #define PTRACE_REG_INTRV(r)	(r)->r_special.!!!
605020ab68Schristos #endif
61