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