GDB (API)
/home/stan/gdb/src/include/gdb/signals.h
Go to the documentation of this file.
00001 /* Target signal numbers for GDB and the GDB remote protocol.
00002    Copyright 1986-2013 Free Software Foundation, Inc.
00003 
00004    This file is part of GDB.
00005 
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; either version 3 of the License, or
00009    (at your option) any later version.
00010 
00011    This program is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014    GNU General Public License for more details.
00015 
00016    You should have received a copy of the GNU General Public License
00017    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
00018 
00019 #ifndef GDB_SIGNALS_H
00020 #define GDB_SIGNALS_H
00021 
00022 /* The numbering of these signals is chosen to match traditional unix
00023    signals (insofar as various unices use the same numbers, anyway).
00024    It is also the numbering of the GDB remote protocol.  Other remote
00025    protocols, if they use a different numbering, should make sure to
00026    translate appropriately.
00027 
00028    Since these numbers have actually made it out into other software
00029    (stubs, etc.), you mustn't disturb the assigned numbering.  If you
00030    need to add new signals here, add them to the end of the explicitly
00031    numbered signals, at the comment marker.  Add them unconditionally,
00032    not within any #if or #ifdef.
00033 
00034    This is based strongly on Unix/POSIX signals for several reasons:
00035    (1) This set of signals represents a widely-accepted attempt to
00036    represent events of this sort in a portable fashion, (2) we want a
00037    signal to make it from wait to child_wait to the user intact, (3) many
00038    remote protocols use a similar encoding.  However, it is
00039    recognized that this set of signals has limitations (such as not
00040    distinguishing between various kinds of SIGSEGV, or not
00041    distinguishing hitting a breakpoint from finishing a single step).
00042    So in the future we may get around this either by adding additional
00043    signals for breakpoint, single-step, etc., or by adding signal
00044    codes; the latter seems more in the spirit of what BSD, System V,
00045    etc. are doing to address these issues.  */
00046 
00047 /* For an explanation of what each signal means, see
00048    gdb_signal_to_string.  */
00049 
00050 enum gdb_signal
00051   {
00052 #define SET(symbol, constant, name, string) \
00053     symbol = constant,
00054 #include "gdb/signals.def"
00055 #undef SET
00056   };
00057 
00058 #endif /* #ifndef GDB_SIGNALS_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines