xref: /illumos-gate/usr/src/uts/common/sys/fault.h (revision ddb365bfc9e868ad24ccdcb0dc91af18b10df082)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright (c) 1999 by Sun Microsystems, Inc.
24  * All rights reserved.
25  */
26 
27 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28 /*	  All Rights Reserved	*/
29 
30 
31 #ifndef _SYS_FAULT_H
32 #define	_SYS_FAULT_H
33 
34 #ifdef	__cplusplus
35 extern "C" {
36 #endif
37 
38 /*
39  * Fault numbers, analagous to signals.  These correspond to
40  * hardware faults.  Setting the appropriate flags in a process's
41  * set of traced faults via /proc causes the process to stop each
42  * time one of the designated faults occurs so that a debugger can
43  * take action.  See proc(5) for details.
44  */
45 
46 	/* fault enumeration must begin with 1 */
47 #define	FLTILL		1	/* Illegal instruction */
48 #define	FLTPRIV		2	/* Privileged instruction */
49 #define	FLTBPT		3	/* Breakpoint instruction */
50 #define	FLTTRACE	4	/* Trace trap (single-step) */
51 #define	FLTACCESS	5	/* Memory access (e.g., alignment) */
52 #define	FLTBOUNDS	6	/* Memory bounds (invalid address) */
53 #define	FLTIOVF		7	/* Integer overflow */
54 #define	FLTIZDIV	8	/* Integer zero divide */
55 #define	FLTFPE		9	/* Floating-point exception */
56 #define	FLTSTACK	10	/* Irrecoverable stack fault */
57 #define	FLTPAGE		11	/* Recoverable page fault (no associated sig) */
58 #define	FLTWATCH	12	/* Watchpoint trap */
59 #define	FLTCPCOVF	13	/* CPU performance counter overflow */
60 
61 typedef struct {		/* fault set type */
62 	unsigned int	word[4];
63 } fltset_t;
64 
65 #ifdef	__cplusplus
66 }
67 #endif
68 
69 #endif	/* _SYS_FAULT_H */
70