xref: /titanic_51/usr/src/lib/libc/sparcv9/gen/siginfolst.c (revision bbaa8b60dd95d714741fc474adad3cf710ef4efd)
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 2010 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 #include "lint.h"
31 #include <signal.h>
32 #include <siginfo.h>
33 
34 #undef	_sys_siginfolist
35 #define	OLDNSIG	34
36 
37 const char *_sys_traplist[NSIGTRAP] = {
38 	"breakpoint trap",
39 	"trace trap",
40 	"read access trap",
41 	"write access trap",
42 	"execute access trap",
43 	"dtrace trap"
44 };
45 
46 const char *_sys_illlist[NSIGILL] = {
47 	"illegal instruction",
48 	"illegal operand",
49 	"illegal addressing mode",
50 	"illegal trap",
51 	"privileged instruction",
52 	"privileged register",
53 	"co-processor",
54 	"bad stack"
55 };
56 
57 const char *_sys_fpelist[NSIGFPE] = {
58 	"integer divide by zero",
59 	"integer overflow",
60 	"floating point divide by zero",
61 	"floating point overflow",
62 	"floating point underflow",
63 	"floating point inexact result",
64 	"invalid floating point operation",
65 	"subscript out of range"
66 };
67 
68 const char *_sys_segvlist[NSIGSEGV] = {
69 	"address not mapped to object",
70 	"invalid permissions"
71 };
72 
73 const char *_sys_buslist[NSIGBUS] = {
74 	"invalid address alignment",
75 	"non-existent physical address",
76 	"object specific"
77 };
78 
79 const char *_sys_cldlist[NSIGCLD] = {
80 	"child has exited",
81 	"child was killed",
82 	"child has coredumped",
83 	"traced child has trapped",
84 	"child has stopped",
85 	"stopped child has continued"
86 };
87 
88 const char *_sys_polllist[NSIGPOLL] = {
89 	"input available",
90 	"output possible",
91 	"message available",
92 	"I/O error",
93 	"high priority input available",
94 	"device disconnected"
95 };
96 
97 struct siginfolist _sys_siginfolist[OLDNSIG-1] = {
98 	0,		0,			/* SIGHUP */
99 	0,		0,			/* SIGINT */
100 	0,		0,			/* SIGQUIT */
101 	NSIGILL,	(char **)_sys_illlist,	/* SIGILL */
102 	NSIGTRAP,	(char **)_sys_traplist,	/* SIGTRAP */
103 	0,		0,			/* SIGABRT */
104 	0,		0,			/* SIGEMT */
105 	NSIGFPE,	(char **)_sys_fpelist,	/* SIGFPE */
106 	0,		0,			/* SIGKILL */
107 	NSIGBUS,	(char **)_sys_buslist,	/* SIGBUS */
108 	NSIGSEGV,	(char **)_sys_segvlist,	/* SIGSEGV */
109 	0,		0,			/* SIGSYS */
110 	0,		0,			/* SIGPIPE */
111 	0,		0,			/* SIGALRM */
112 	0,		0,			/* SIGTERM */
113 	0,		0,			/* SIGUSR1 */
114 	0,		0,			/* SIGUSR2 */
115 	NSIGCLD,	(char **)_sys_cldlist,	/* SIGCLD */
116 	0,		0,			/* SIGPWR */
117 	0,		0,			/* SIGWINCH */
118 	0,		0,			/* SIGURG */
119 	NSIGPOLL,	(char **)_sys_polllist,	/* SIGPOLL */
120 	0,		0,			/* SIGSTOP */
121 	0,		0,			/* SIGTSTP */
122 	0,		0,			/* SIGCONT */
123 	0,		0,			/* SIGTTIN */
124 	0,		0,			/* SIGTTOU */
125 	0,		0,			/* SIGVTALRM */
126 	0,		0,			/* SIGPROF */
127 	0,		0,			/* SIGXCPU */
128 	0,		0,			/* SIGXFSZ */
129 	0,		0,			/* SIGWAITING */
130 	0,		0,			/* SIGLWP */
131 };
132 
133 static const struct siginfolist _sys_siginfolist_data[NSIG-1] = {
134 	0,		0,			/* SIGHUP */
135 	0,		0,			/* SIGINT */
136 	0,		0,			/* SIGQUIT */
137 	NSIGILL,	(char **)_sys_illlist,	/* SIGILL */
138 	NSIGTRAP,	(char **)_sys_traplist,	/* SIGTRAP */
139 	0,		0,			/* SIGABRT */
140 	0,		0,			/* SIGEMT */
141 	NSIGFPE,	(char **)_sys_fpelist,	/* SIGFPE */
142 	0,		0,			/* SIGKILL */
143 	NSIGBUS,	(char **)_sys_buslist,	/* SIGBUS */
144 	NSIGSEGV,	(char **)_sys_segvlist,	/* SIGSEGV */
145 	0,		0,			/* SIGSYS */
146 	0,		0,			/* SIGPIPE */
147 	0,		0,			/* SIGALRM */
148 	0,		0,			/* SIGTERM */
149 	0,		0,			/* SIGUSR1 */
150 	0,		0,			/* SIGUSR2 */
151 	NSIGCLD,	(char **)_sys_cldlist,	/* SIGCLD */
152 	0,		0,			/* SIGPWR */
153 	0,		0,			/* SIGWINCH */
154 	0,		0,			/* SIGURG */
155 	NSIGPOLL,	(char **)_sys_polllist,	/* SIGPOLL */
156 	0,		0,			/* SIGSTOP */
157 	0,		0,			/* SIGTSTP */
158 	0,		0,			/* SIGCONT */
159 	0,		0,			/* SIGTTIN */
160 	0,		0,			/* SIGTTOU */
161 	0,		0,			/* SIGVTALRM */
162 	0,		0,			/* SIGPROF */
163 	0,		0,			/* SIGXCPU */
164 	0,		0,			/* SIGXFSZ */
165 	0,		0,			/* SIGWAITING */
166 	0,		0,			/* SIGLWP */
167 	0,		0,			/* SIGFREEZE */
168 	0,		0,			/* SIGTHAW */
169 	0,		0,			/* SIGCANCEL */
170 	0,		0,			/* SIGLOST */
171 	0,		0,			/* SIGXRES */
172 	0,		0,			/* SIGJVM1 */
173 	0,		0,			/* SIGJVM2 */
174 	0,		0,			/* SIGRTMIN */
175 	0,		0,			/* SIGRTMIN+1 */
176 	0,		0,			/* SIGRTMIN+2 */
177 	0,		0,			/* SIGRTMIN+3 */
178 	0,		0,
179 	0,		0,
180 	0,		0,
181 	0,		0,
182 	0,		0,
183 	0,		0,
184 	0,		0,
185 	0,		0,
186 	0,		0,
187 	0,		0,
188 	0,		0,
189 	0,		0,			/* SIGRTMIN+15 */
190 	0,		0,			/* SIGRTMAX-15 */
191 	0,		0,
192 	0,		0,
193 	0,		0,
194 	0,		0,
195 	0,		0,
196 	0,		0,
197 	0,		0,
198 	0,		0,
199 	0,		0,
200 	0,		0,
201 	0,		0,
202 	0,		0,			/* SIGRTMAX-3 */
203 	0,		0,			/* SIGRTMAX-2 */
204 	0,		0,			/* SIGRTMAX-1 */
205 	0,		0,			/* SIGRTMAX */
206 };
207 
208 const struct siginfolist *_sys_siginfolistp = _sys_siginfolist_data;
209