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