xref: /titanic_52/usr/src/lib/libc/amd64/gen/siginfolst.c (revision 71269a2275bf5a143dad6461eee2710a344e7261)
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 (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 /*	Copyright (c) 1988 AT&T	*/
28 /*	  All Rights Reserved  	*/
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #include "lint.h"
33 #include <signal.h>
34 #include <siginfo.h>
35 
36 #undef _sys_siginfolist
37 #define	OLDNSIG 34
38 
39 const char *_sys_traplist[NSIGTRAP] = {
40 	"breakpoint trap",
41 	"trace trap",
42 	"read access trap",
43 	"write access trap",
44 	"execute access trap",
45 	"dtrace trap"
46 };
47 
48 const char *_sys_illlist[NSIGILL] = {
49 	"illegal opcode",
50 	"illegal operand",
51 	"illegal addressing mode",
52 	"illegal trap",
53 	"privileged instruction",
54 	"privileged register",
55 	"co-processor",
56 	"bad stack"
57 };
58 
59 const char *_sys_fpelist[NSIGFPE] = {
60 	"integer divide by zero",
61 	"integer overflow",
62 	"floating point divide by zero",
63 	"floating point overflow",
64 	"floating point underflow",
65 	"floating point inexact result",
66 	"invalid floating point operation",
67 	"subscript out of range"
68 };
69 
70 const char *_sys_segvlist[NSIGSEGV] = {
71 	"address not mapped to object",
72 	"invalid permissions",
73 };
74 
75 const char *_sys_buslist[NSIGBUS] = {
76 	"invalid address alignment",
77 	"non-existent physical address",
78 	"object specific"
79 };
80 
81 const char *_sys_cldlist[NSIGCLD] = {
82 	"child has exited",
83 	"child was killed",
84 	"child has coredumped",
85 	"traced child has trapped",
86 	"child has stopped",
87 	"stopped child has continued"
88 };
89 
90 const char *_sys_polllist[NSIGPOLL] = {
91 	"input available",
92 	"output possible",
93 	"message available",
94 	"I/O error",
95 	"high priority input available",
96 	"device disconnected"
97 };
98 
99 struct siginfolist _sys_siginfolist[OLDNSIG-1] = {
100 	0,		0,			/* SIGHUP */
101 	0,		0,			/* SIGINT */
102 	0,		0,			/* SIGQUIT */
103 	NSIGILL,	(char **)_sys_illlist,	/* SIGILL */
104 	NSIGTRAP,	(char **)_sys_traplist,	/* SIGTRAP */
105 	0,		0,			/* SIGABRT */
106 	0,		0,			/* SIGEMT */
107 	NSIGFPE,	(char **)_sys_fpelist,	/* SIGFPE */
108 	0,		0,			/* SIGKILL */
109 	NSIGBUS,	(char **)_sys_buslist,	/* SIGBUS */
110 	NSIGSEGV,	(char **)_sys_segvlist,	/* SIGSEGV */
111 	0,		0,			/* SIGSYS */
112 	0,		0,			/* SIGPIPE */
113 	0,		0,			/* SIGALRM */
114 	0,		0,			/* SIGTERM */
115 	0,		0,			/* SIGUSR1 */
116 	0,		0,			/* SIGUSR2 */
117 	NSIGCLD,	(char **)_sys_cldlist,	/* SIGCLD */
118 	0,		0,			/* SIGPWR */
119 	0,		0,			/* SIGWINCH */
120 	0,		0,			/* SIGURG */
121 	NSIGPOLL,	(char **)_sys_polllist,	/* SIGPOLL */
122 	0,		0,			/* SIGSTOP */
123 	0,		0,			/* SIGTSTP */
124 	0,		0,			/* SIGCONT */
125 	0,		0,			/* SIGTTIN */
126 	0,		0,			/* SIGTTOU */
127 	0,		0,			/* SIGVTALRM */
128 	0,		0,			/* SIGPROF */
129 	0,		0,			/* SIGXCPU */
130 	0,		0,			/* SIGXFSZ */
131 	0,		0,			/* SIGWAITING */
132 	0,		0,			/* SIGLWP */
133 };
134 
135 static const struct siginfolist _sys_siginfolist_data[NSIG-1] = {
136 	0,		0,			/* SIGHUP */
137 	0,		0,			/* SIGINT */
138 	0,		0,			/* SIGQUIT */
139 	NSIGILL,	(char **)_sys_illlist,	/* SIGILL */
140 	NSIGTRAP,	(char **)_sys_traplist,	/* SIGTRAP */
141 	0,		0,			/* SIGABRT */
142 	0,		0,			/* SIGEMT */
143 	NSIGFPE,	(char **)_sys_fpelist,	/* SIGFPE */
144 	0,		0,			/* SIGKILL */
145 	NSIGBUS,	(char **)_sys_buslist,	/* SIGBUS */
146 	NSIGSEGV,	(char **)_sys_segvlist,	/* SIGSEGV */
147 	0,		0,			/* SIGSYS */
148 	0,		0,			/* SIGPIPE */
149 	0,		0,			/* SIGALRM */
150 	0,		0,			/* SIGTERM */
151 	0,		0,			/* SIGUSR1 */
152 	0,		0,			/* SIGUSR2 */
153 	NSIGCLD,	(char **)_sys_cldlist,	/* SIGCLD */
154 	0,		0,			/* SIGPWR */
155 	0,		0,			/* SIGWINCH */
156 	0,		0,			/* SIGURG */
157 	NSIGPOLL,	(char **)_sys_polllist,	/* SIGPOLL */
158 	0,		0,			/* SIGSTOP */
159 	0,		0,			/* SIGTSTP */
160 	0,		0,			/* SIGCONT */
161 	0,		0,			/* SIGTTIN */
162 	0,		0,			/* SIGTTOU */
163 	0,		0,			/* SIGVTALRM */
164 	0,		0,			/* SIGPROF */
165 	0,		0,			/* SIGXCPU */
166 	0,		0,			/* SIGXFSZ */
167 	0,		0,			/* SIGWAITING */
168 	0,		0,			/* SIGLWP */
169 	0,		0,			/* SIGFREEZE */
170 	0,		0,			/* SIGTHAW */
171 	0,		0,			/* SIGCANCEL */
172 	0,		0,			/* SIGLOST */
173 	0,		0,			/* SIGXRES */
174 	0,		0,			/* SIGJVM1 */
175 	0,		0,			/* SIGJVM2 */
176 	0,		0,			/* SIGRTMIN */
177 	0,		0,			/* SIGRTMIN+1 */
178 	0,		0,			/* SIGRTMIN+2 */
179 	0,		0,			/* SIGRTMIN+3 */
180 	0,		0,			/* SIGRTMAX-3 */
181 	0,		0,			/* SIGRTMAX-2 */
182 	0,		0,			/* SIGRTMAX-1 */
183 	0,		0,			/* SIGRTMAX */
184 };
185 
186 const struct siginfolist *_sys_siginfolistp = _sys_siginfolist_data;
187