12a6b7db3Sskrll /* Target signal numbers for GDB and the GDB remote protocol. 2*cb63e24eSchristos Copyright (C) 1986-2024 Free Software Foundation, Inc. 32a6b7db3Sskrll 42a6b7db3Sskrll This file is part of GDB. 52a6b7db3Sskrll 62a6b7db3Sskrll This program is free software; you can redistribute it and/or modify 72a6b7db3Sskrll it under the terms of the GNU General Public License as published by 82a6b7db3Sskrll the Free Software Foundation; either version 3 of the License, or 92a6b7db3Sskrll (at your option) any later version. 102a6b7db3Sskrll 112a6b7db3Sskrll This program is distributed in the hope that it will be useful, 122a6b7db3Sskrll but WITHOUT ANY WARRANTY; without even the implied warranty of 132a6b7db3Sskrll MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 142a6b7db3Sskrll GNU General Public License for more details. 152a6b7db3Sskrll 162a6b7db3Sskrll You should have received a copy of the GNU General Public License 172a6b7db3Sskrll along with this program. If not, see <http://www.gnu.org/licenses/>. */ 182a6b7db3Sskrll 192a6b7db3Sskrll #ifndef GDB_SIGNALS_H 202a6b7db3Sskrll #define GDB_SIGNALS_H 212a6b7db3Sskrll 222a6b7db3Sskrll /* The numbering of these signals is chosen to match traditional unix 232a6b7db3Sskrll signals (insofar as various unices use the same numbers, anyway). 242a6b7db3Sskrll It is also the numbering of the GDB remote protocol. Other remote 252a6b7db3Sskrll protocols, if they use a different numbering, should make sure to 262a6b7db3Sskrll translate appropriately. 272a6b7db3Sskrll 282a6b7db3Sskrll Since these numbers have actually made it out into other software 292a6b7db3Sskrll (stubs, etc.), you mustn't disturb the assigned numbering. If you 302a6b7db3Sskrll need to add new signals here, add them to the end of the explicitly 312a6b7db3Sskrll numbered signals, at the comment marker. Add them unconditionally, 322a6b7db3Sskrll not within any #if or #ifdef. 332a6b7db3Sskrll 342a6b7db3Sskrll This is based strongly on Unix/POSIX signals for several reasons: 352a6b7db3Sskrll (1) This set of signals represents a widely-accepted attempt to 362a6b7db3Sskrll represent events of this sort in a portable fashion, (2) we want a 372a6b7db3Sskrll signal to make it from wait to child_wait to the user intact, (3) many 382a6b7db3Sskrll remote protocols use a similar encoding. However, it is 392a6b7db3Sskrll recognized that this set of signals has limitations (such as not 402a6b7db3Sskrll distinguishing between various kinds of SIGSEGV, or not 412a6b7db3Sskrll distinguishing hitting a breakpoint from finishing a single step). 422a6b7db3Sskrll So in the future we may get around this either by adding additional 432a6b7db3Sskrll signals for breakpoint, single-step, etc., or by adding signal 442a6b7db3Sskrll codes; the latter seems more in the spirit of what BSD, System V, 452a6b7db3Sskrll etc. are doing to address these issues. */ 462a6b7db3Sskrll 472a6b7db3Sskrll /* For an explanation of what each signal means, see 48883529b6Schristos gdb_signal_to_string. */ 492a6b7db3Sskrll 50883529b6Schristos enum gdb_signal 512a6b7db3Sskrll { 5245548106Schristos #define SET(symbol, constant, name, string) \ 5345548106Schristos symbol = constant, 5445548106Schristos #include "gdb/signals.def" 5545548106Schristos #undef SET 562a6b7db3Sskrll }; 572a6b7db3Sskrll 582a6b7db3Sskrll #endif /* #ifndef GDB_SIGNALS_H */ 59