xref: /titanic_41/usr/src/uts/common/sys/fault.h (revision dd49f125507979bb2ab505a8daf2a46d1be27051)
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 #pragma ident	"%Z%%M%	%I%	%E% SMI"
35 
36 #ifdef	__cplusplus
37 extern "C" {
38 #endif
39 
40 /*
41  * Fault numbers, analagous to signals.  These correspond to
42  * hardware faults.  Setting the appropriate flags in a process's
43  * set of traced faults via /proc causes the process to stop each
44  * time one of the designated faults occurs so that a debugger can
45  * take action.  See proc(4) for details.
46  */
47 
48 	/* fault enumeration must begin with 1 */
49 #define	FLTILL		1	/* Illegal instruction */
50 #define	FLTPRIV		2	/* Privileged instruction */
51 #define	FLTBPT		3	/* Breakpoint instruction */
52 #define	FLTTRACE	4	/* Trace trap (single-step) */
53 #define	FLTACCESS	5	/* Memory access (e.g., alignment) */
54 #define	FLTBOUNDS	6	/* Memory bounds (invalid address) */
55 #define	FLTIOVF		7	/* Integer overflow */
56 #define	FLTIZDIV	8	/* Integer zero divide */
57 #define	FLTFPE		9	/* Floating-point exception */
58 #define	FLTSTACK	10	/* Irrecoverable stack fault */
59 #define	FLTPAGE		11	/* Recoverable page fault (no associated sig) */
60 #define	FLTWATCH	12	/* Watchpoint trap */
61 #define	FLTCPCOVF	13	/* CPU performance counter overflow */
62 
63 typedef struct {		/* fault set type */
64 	unsigned int	word[4];
65 } fltset_t;
66 
67 #ifdef	__cplusplus
68 }
69 #endif
70 
71 #endif	/* _SYS_FAULT_H */
72