175fd0b74Schristos /* Target signal numbers for GDB and the GDB remote protocol. 2*e992f068Schristos Copyright (C) 1986-2022 Free Software Foundation, Inc. 375fd0b74Schristos 475fd0b74Schristos This file is part of GDB. 575fd0b74Schristos 675fd0b74Schristos This program is free software; you can redistribute it and/or modify 775fd0b74Schristos it under the terms of the GNU General Public License as published by 875fd0b74Schristos the Free Software Foundation; either version 3 of the License, or 975fd0b74Schristos (at your option) any later version. 1075fd0b74Schristos 1175fd0b74Schristos This program is distributed in the hope that it will be useful, 1275fd0b74Schristos but WITHOUT ANY WARRANTY; without even the implied warranty of 1375fd0b74Schristos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1475fd0b74Schristos GNU General Public License for more details. 1575fd0b74Schristos 1675fd0b74Schristos You should have received a copy of the GNU General Public License 1775fd0b74Schristos along with this program. If not, see <http://www.gnu.org/licenses/>. */ 1875fd0b74Schristos 1975fd0b74Schristos #ifndef GDB_SIGNALS_H 2075fd0b74Schristos #define GDB_SIGNALS_H 2175fd0b74Schristos 2275fd0b74Schristos /* The numbering of these signals is chosen to match traditional unix 2375fd0b74Schristos signals (insofar as various unices use the same numbers, anyway). 2475fd0b74Schristos It is also the numbering of the GDB remote protocol. Other remote 2575fd0b74Schristos protocols, if they use a different numbering, should make sure to 2675fd0b74Schristos translate appropriately. 2775fd0b74Schristos 2875fd0b74Schristos Since these numbers have actually made it out into other software 2975fd0b74Schristos (stubs, etc.), you mustn't disturb the assigned numbering. If you 3075fd0b74Schristos need to add new signals here, add them to the end of the explicitly 3175fd0b74Schristos numbered signals, at the comment marker. Add them unconditionally, 3275fd0b74Schristos not within any #if or #ifdef. 3375fd0b74Schristos 3475fd0b74Schristos This is based strongly on Unix/POSIX signals for several reasons: 3575fd0b74Schristos (1) This set of signals represents a widely-accepted attempt to 3675fd0b74Schristos represent events of this sort in a portable fashion, (2) we want a 3775fd0b74Schristos signal to make it from wait to child_wait to the user intact, (3) many 3875fd0b74Schristos remote protocols use a similar encoding. However, it is 3975fd0b74Schristos recognized that this set of signals has limitations (such as not 4075fd0b74Schristos distinguishing between various kinds of SIGSEGV, or not 4175fd0b74Schristos distinguishing hitting a breakpoint from finishing a single step). 4275fd0b74Schristos So in the future we may get around this either by adding additional 4375fd0b74Schristos signals for breakpoint, single-step, etc., or by adding signal 4475fd0b74Schristos codes; the latter seems more in the spirit of what BSD, System V, 4575fd0b74Schristos etc. are doing to address these issues. */ 4675fd0b74Schristos 4775fd0b74Schristos /* For an explanation of what each signal means, see 4875fd0b74Schristos gdb_signal_to_string. */ 4975fd0b74Schristos 5075fd0b74Schristos enum gdb_signal 5175fd0b74Schristos { 5275fd0b74Schristos #define SET(symbol, constant, name, string) \ 5375fd0b74Schristos symbol = constant, 5475fd0b74Schristos #include "gdb/signals.def" 5575fd0b74Schristos #undef SET 5675fd0b74Schristos }; 5775fd0b74Schristos 5875fd0b74Schristos #endif /* #ifndef GDB_SIGNALS_H */ 59