]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - include/gdb/signals.h
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / include / gdb / signals.h
CommitLineData
dd7bf85e 1/* Target signal numbers for GDB and the GDB remote protocol.
250d07de 2 Copyright (C) 1986-2021 Free Software Foundation, Inc.
dd7bf85e
DJ
3
4 This file is part of GDB.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
1d52ba21 8 the Free Software Foundation; either version 3 of the License, or
dd7bf85e
DJ
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
1d52ba21 17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
dd7bf85e
DJ
18
19#ifndef GDB_SIGNALS_H
20#define GDB_SIGNALS_H
21
22/* The numbering of these signals is chosen to match traditional unix
23 signals (insofar as various unices use the same numbers, anyway).
24 It is also the numbering of the GDB remote protocol. Other remote
25 protocols, if they use a different numbering, should make sure to
26 translate appropriately.
27
28 Since these numbers have actually made it out into other software
29 (stubs, etc.), you mustn't disturb the assigned numbering. If you
30 need to add new signals here, add them to the end of the explicitly
1a79372d
DJ
31 numbered signals, at the comment marker. Add them unconditionally,
32 not within any #if or #ifdef.
dd7bf85e
DJ
33
34 This is based strongly on Unix/POSIX signals for several reasons:
35 (1) This set of signals represents a widely-accepted attempt to
36 represent events of this sort in a portable fashion, (2) we want a
37 signal to make it from wait to child_wait to the user intact, (3) many
38 remote protocols use a similar encoding. However, it is
39 recognized that this set of signals has limitations (such as not
40 distinguishing between various kinds of SIGSEGV, or not
41 distinguishing hitting a breakpoint from finishing a single step).
42 So in the future we may get around this either by adding additional
43 signals for breakpoint, single-step, etc., or by adding signal
44 codes; the latter seems more in the spirit of what BSD, System V,
45 etc. are doing to address these issues. */
46
47/* For an explanation of what each signal means, see
2ea28649 48 gdb_signal_to_string. */
dd7bf85e 49
2ea28649 50enum gdb_signal
dd7bf85e 51 {
a19cae16
JK
52#define SET(symbol, constant, name, string) \
53 symbol = constant,
a19cae16 54#include "gdb/signals.def"
a19cae16 55#undef SET
dd7bf85e
DJ
56 };
57
58#endif /* #ifndef GDB_SIGNALS_H */