bfd/
[binutils.git] / include / gdb / signals.h
blobc43ddc18571a9ea9af21cbe3c3f7528fa349af88
1 /* Target signal numbers for GDB and the GDB remote protocol.
2 Copyright 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
3 1998, 1999, 2000, 2001, 2002, 2007 Free Software Foundation, Inc.
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
22 #ifndef GDB_SIGNALS_H
23 #define GDB_SIGNALS_H
25 /* The numbering of these signals is chosen to match traditional unix
26 signals (insofar as various unices use the same numbers, anyway).
27 It is also the numbering of the GDB remote protocol. Other remote
28 protocols, if they use a different numbering, should make sure to
29 translate appropriately.
31 Since these numbers have actually made it out into other software
32 (stubs, etc.), you mustn't disturb the assigned numbering. If you
33 need to add new signals here, add them to the end of the explicitly
34 numbered signals, at the comment marker. Add them unconditionally,
35 not within any #if or #ifdef.
37 This is based strongly on Unix/POSIX signals for several reasons:
38 (1) This set of signals represents a widely-accepted attempt to
39 represent events of this sort in a portable fashion, (2) we want a
40 signal to make it from wait to child_wait to the user intact, (3) many
41 remote protocols use a similar encoding. However, it is
42 recognized that this set of signals has limitations (such as not
43 distinguishing between various kinds of SIGSEGV, or not
44 distinguishing hitting a breakpoint from finishing a single step).
45 So in the future we may get around this either by adding additional
46 signals for breakpoint, single-step, etc., or by adding signal
47 codes; the latter seems more in the spirit of what BSD, System V,
48 etc. are doing to address these issues. */
50 /* For an explanation of what each signal means, see
51 target_signal_to_string. */
53 enum target_signal
55 /* Used some places (e.g. stop_signal) to record the concept that
56 there is no signal. */
57 TARGET_SIGNAL_0 = 0,
58 TARGET_SIGNAL_FIRST = 0,
59 TARGET_SIGNAL_HUP = 1,
60 TARGET_SIGNAL_INT = 2,
61 TARGET_SIGNAL_QUIT = 3,
62 TARGET_SIGNAL_ILL = 4,
63 TARGET_SIGNAL_TRAP = 5,
64 TARGET_SIGNAL_ABRT = 6,
65 TARGET_SIGNAL_EMT = 7,
66 TARGET_SIGNAL_FPE = 8,
67 TARGET_SIGNAL_KILL = 9,
68 TARGET_SIGNAL_BUS = 10,
69 TARGET_SIGNAL_SEGV = 11,
70 TARGET_SIGNAL_SYS = 12,
71 TARGET_SIGNAL_PIPE = 13,
72 TARGET_SIGNAL_ALRM = 14,
73 TARGET_SIGNAL_TERM = 15,
74 TARGET_SIGNAL_URG = 16,
75 TARGET_SIGNAL_STOP = 17,
76 TARGET_SIGNAL_TSTP = 18,
77 TARGET_SIGNAL_CONT = 19,
78 TARGET_SIGNAL_CHLD = 20,
79 TARGET_SIGNAL_TTIN = 21,
80 TARGET_SIGNAL_TTOU = 22,
81 TARGET_SIGNAL_IO = 23,
82 TARGET_SIGNAL_XCPU = 24,
83 TARGET_SIGNAL_XFSZ = 25,
84 TARGET_SIGNAL_VTALRM = 26,
85 TARGET_SIGNAL_PROF = 27,
86 TARGET_SIGNAL_WINCH = 28,
87 TARGET_SIGNAL_LOST = 29,
88 TARGET_SIGNAL_USR1 = 30,
89 TARGET_SIGNAL_USR2 = 31,
90 TARGET_SIGNAL_PWR = 32,
91 /* Similar to SIGIO. Perhaps they should have the same number. */
92 TARGET_SIGNAL_POLL = 33,
93 TARGET_SIGNAL_WIND = 34,
94 TARGET_SIGNAL_PHONE = 35,
95 TARGET_SIGNAL_WAITING = 36,
96 TARGET_SIGNAL_LWP = 37,
97 TARGET_SIGNAL_DANGER = 38,
98 TARGET_SIGNAL_GRANT = 39,
99 TARGET_SIGNAL_RETRACT = 40,
100 TARGET_SIGNAL_MSG = 41,
101 TARGET_SIGNAL_SOUND = 42,
102 TARGET_SIGNAL_SAK = 43,
103 TARGET_SIGNAL_PRIO = 44,
104 TARGET_SIGNAL_REALTIME_33 = 45,
105 TARGET_SIGNAL_REALTIME_34 = 46,
106 TARGET_SIGNAL_REALTIME_35 = 47,
107 TARGET_SIGNAL_REALTIME_36 = 48,
108 TARGET_SIGNAL_REALTIME_37 = 49,
109 TARGET_SIGNAL_REALTIME_38 = 50,
110 TARGET_SIGNAL_REALTIME_39 = 51,
111 TARGET_SIGNAL_REALTIME_40 = 52,
112 TARGET_SIGNAL_REALTIME_41 = 53,
113 TARGET_SIGNAL_REALTIME_42 = 54,
114 TARGET_SIGNAL_REALTIME_43 = 55,
115 TARGET_SIGNAL_REALTIME_44 = 56,
116 TARGET_SIGNAL_REALTIME_45 = 57,
117 TARGET_SIGNAL_REALTIME_46 = 58,
118 TARGET_SIGNAL_REALTIME_47 = 59,
119 TARGET_SIGNAL_REALTIME_48 = 60,
120 TARGET_SIGNAL_REALTIME_49 = 61,
121 TARGET_SIGNAL_REALTIME_50 = 62,
122 TARGET_SIGNAL_REALTIME_51 = 63,
123 TARGET_SIGNAL_REALTIME_52 = 64,
124 TARGET_SIGNAL_REALTIME_53 = 65,
125 TARGET_SIGNAL_REALTIME_54 = 66,
126 TARGET_SIGNAL_REALTIME_55 = 67,
127 TARGET_SIGNAL_REALTIME_56 = 68,
128 TARGET_SIGNAL_REALTIME_57 = 69,
129 TARGET_SIGNAL_REALTIME_58 = 70,
130 TARGET_SIGNAL_REALTIME_59 = 71,
131 TARGET_SIGNAL_REALTIME_60 = 72,
132 TARGET_SIGNAL_REALTIME_61 = 73,
133 TARGET_SIGNAL_REALTIME_62 = 74,
134 TARGET_SIGNAL_REALTIME_63 = 75,
136 /* Used internally by Solaris threads. See signal(5) on Solaris. */
137 TARGET_SIGNAL_CANCEL = 76,
139 /* Yes, this pains me, too. But LynxOS didn't have SIG32, and now
140 GNU/Linux does, and we can't disturb the numbering, since it's
141 part of the remote protocol. Note that in some GDB's
142 TARGET_SIGNAL_REALTIME_32 is number 76. */
143 TARGET_SIGNAL_REALTIME_32,
144 /* Yet another pain, IRIX 6 has SIG64. */
145 TARGET_SIGNAL_REALTIME_64,
146 /* Yet another pain, GNU/Linux MIPS might go up to 128. */
147 TARGET_SIGNAL_REALTIME_65,
148 TARGET_SIGNAL_REALTIME_66,
149 TARGET_SIGNAL_REALTIME_67,
150 TARGET_SIGNAL_REALTIME_68,
151 TARGET_SIGNAL_REALTIME_69,
152 TARGET_SIGNAL_REALTIME_70,
153 TARGET_SIGNAL_REALTIME_71,
154 TARGET_SIGNAL_REALTIME_72,
155 TARGET_SIGNAL_REALTIME_73,
156 TARGET_SIGNAL_REALTIME_74,
157 TARGET_SIGNAL_REALTIME_75,
158 TARGET_SIGNAL_REALTIME_76,
159 TARGET_SIGNAL_REALTIME_77,
160 TARGET_SIGNAL_REALTIME_78,
161 TARGET_SIGNAL_REALTIME_79,
162 TARGET_SIGNAL_REALTIME_80,
163 TARGET_SIGNAL_REALTIME_81,
164 TARGET_SIGNAL_REALTIME_82,
165 TARGET_SIGNAL_REALTIME_83,
166 TARGET_SIGNAL_REALTIME_84,
167 TARGET_SIGNAL_REALTIME_85,
168 TARGET_SIGNAL_REALTIME_86,
169 TARGET_SIGNAL_REALTIME_87,
170 TARGET_SIGNAL_REALTIME_88,
171 TARGET_SIGNAL_REALTIME_89,
172 TARGET_SIGNAL_REALTIME_90,
173 TARGET_SIGNAL_REALTIME_91,
174 TARGET_SIGNAL_REALTIME_92,
175 TARGET_SIGNAL_REALTIME_93,
176 TARGET_SIGNAL_REALTIME_94,
177 TARGET_SIGNAL_REALTIME_95,
178 TARGET_SIGNAL_REALTIME_96,
179 TARGET_SIGNAL_REALTIME_97,
180 TARGET_SIGNAL_REALTIME_98,
181 TARGET_SIGNAL_REALTIME_99,
182 TARGET_SIGNAL_REALTIME_100,
183 TARGET_SIGNAL_REALTIME_101,
184 TARGET_SIGNAL_REALTIME_102,
185 TARGET_SIGNAL_REALTIME_103,
186 TARGET_SIGNAL_REALTIME_104,
187 TARGET_SIGNAL_REALTIME_105,
188 TARGET_SIGNAL_REALTIME_106,
189 TARGET_SIGNAL_REALTIME_107,
190 TARGET_SIGNAL_REALTIME_108,
191 TARGET_SIGNAL_REALTIME_109,
192 TARGET_SIGNAL_REALTIME_110,
193 TARGET_SIGNAL_REALTIME_111,
194 TARGET_SIGNAL_REALTIME_112,
195 TARGET_SIGNAL_REALTIME_113,
196 TARGET_SIGNAL_REALTIME_114,
197 TARGET_SIGNAL_REALTIME_115,
198 TARGET_SIGNAL_REALTIME_116,
199 TARGET_SIGNAL_REALTIME_117,
200 TARGET_SIGNAL_REALTIME_118,
201 TARGET_SIGNAL_REALTIME_119,
202 TARGET_SIGNAL_REALTIME_120,
203 TARGET_SIGNAL_REALTIME_121,
204 TARGET_SIGNAL_REALTIME_122,
205 TARGET_SIGNAL_REALTIME_123,
206 TARGET_SIGNAL_REALTIME_124,
207 TARGET_SIGNAL_REALTIME_125,
208 TARGET_SIGNAL_REALTIME_126,
209 TARGET_SIGNAL_REALTIME_127,
211 TARGET_SIGNAL_INFO,
213 /* Some signal we don't know about. */
214 TARGET_SIGNAL_UNKNOWN,
216 /* Use whatever signal we use when one is not specifically specified
217 (for passing to proceed and so on). */
218 TARGET_SIGNAL_DEFAULT,
220 /* Mach exceptions. In versions of GDB before 5.2, these were just before
221 TARGET_SIGNAL_INFO if you were compiling on a Mach host (and missing
222 otherwise). */
223 TARGET_EXC_BAD_ACCESS,
224 TARGET_EXC_BAD_INSTRUCTION,
225 TARGET_EXC_ARITHMETIC,
226 TARGET_EXC_EMULATION,
227 TARGET_EXC_SOFTWARE,
228 TARGET_EXC_BREAKPOINT,
230 /* If you are adding a new signal, add it just above this comment. */
232 /* Last and unused enum value, for sizing arrays, etc. */
233 TARGET_SIGNAL_LAST
236 #endif /* #ifndef GDB_SIGNALS_H */