Back to index

cell-binutils  2.17cvs20070401
signals.h
Go to the documentation of this file.
00001 /* Target signal numbers for GDB and the GDB remote protocol.
00002    Copyright 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
00003    1998, 1999, 2000, 2001, 2002, 2007 Free Software Foundation, Inc.
00004 
00005    This file is part of GDB.
00006 
00007    This program is free software; you can redistribute it and/or modify
00008    it under the terms of the GNU General Public License as published by
00009    the Free Software Foundation; either version 2 of the License, or
00010    (at your option) any later version.
00011 
00012    This program is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015    GNU General Public License for more details.
00016 
00017    You should have received a copy of the GNU General Public License
00018    along with this program; if not, write to the Free Software
00019    Foundation, Inc., 59 Temple Place - Suite 330,
00020    Boston, MA 02111-1307, USA.  */
00021 
00022 #ifndef GDB_SIGNALS_H
00023 #define GDB_SIGNALS_H
00024 
00025 /* The numbering of these signals is chosen to match traditional unix
00026    signals (insofar as various unices use the same numbers, anyway).
00027    It is also the numbering of the GDB remote protocol.  Other remote
00028    protocols, if they use a different numbering, should make sure to
00029    translate appropriately.
00030 
00031    Since these numbers have actually made it out into other software
00032    (stubs, etc.), you mustn't disturb the assigned numbering.  If you
00033    need to add new signals here, add them to the end of the explicitly
00034    numbered signals, at the comment marker.  Add them unconditionally,
00035    not within any #if or #ifdef.
00036 
00037    This is based strongly on Unix/POSIX signals for several reasons:
00038    (1) This set of signals represents a widely-accepted attempt to
00039    represent events of this sort in a portable fashion, (2) we want a
00040    signal to make it from wait to child_wait to the user intact, (3) many
00041    remote protocols use a similar encoding.  However, it is
00042    recognized that this set of signals has limitations (such as not
00043    distinguishing between various kinds of SIGSEGV, or not
00044    distinguishing hitting a breakpoint from finishing a single step).
00045    So in the future we may get around this either by adding additional
00046    signals for breakpoint, single-step, etc., or by adding signal
00047    codes; the latter seems more in the spirit of what BSD, System V,
00048    etc. are doing to address these issues.  */
00049 
00050 /* For an explanation of what each signal means, see
00051    target_signal_to_string.  */
00052 
00053 enum target_signal
00054   {
00055     /* Used some places (e.g. stop_signal) to record the concept that
00056        there is no signal.  */
00057     TARGET_SIGNAL_0 = 0,
00058     TARGET_SIGNAL_FIRST = 0,
00059     TARGET_SIGNAL_HUP = 1,
00060     TARGET_SIGNAL_INT = 2,
00061     TARGET_SIGNAL_QUIT = 3,
00062     TARGET_SIGNAL_ILL = 4,
00063     TARGET_SIGNAL_TRAP = 5,
00064     TARGET_SIGNAL_ABRT = 6,
00065     TARGET_SIGNAL_EMT = 7,
00066     TARGET_SIGNAL_FPE = 8,
00067     TARGET_SIGNAL_KILL = 9,
00068     TARGET_SIGNAL_BUS = 10,
00069     TARGET_SIGNAL_SEGV = 11,
00070     TARGET_SIGNAL_SYS = 12,
00071     TARGET_SIGNAL_PIPE = 13,
00072     TARGET_SIGNAL_ALRM = 14,
00073     TARGET_SIGNAL_TERM = 15,
00074     TARGET_SIGNAL_URG = 16,
00075     TARGET_SIGNAL_STOP = 17,
00076     TARGET_SIGNAL_TSTP = 18,
00077     TARGET_SIGNAL_CONT = 19,
00078     TARGET_SIGNAL_CHLD = 20,
00079     TARGET_SIGNAL_TTIN = 21,
00080     TARGET_SIGNAL_TTOU = 22,
00081     TARGET_SIGNAL_IO = 23,
00082     TARGET_SIGNAL_XCPU = 24,
00083     TARGET_SIGNAL_XFSZ = 25,
00084     TARGET_SIGNAL_VTALRM = 26,
00085     TARGET_SIGNAL_PROF = 27,
00086     TARGET_SIGNAL_WINCH = 28,
00087     TARGET_SIGNAL_LOST = 29,
00088     TARGET_SIGNAL_USR1 = 30,
00089     TARGET_SIGNAL_USR2 = 31,
00090     TARGET_SIGNAL_PWR = 32,
00091     /* Similar to SIGIO.  Perhaps they should have the same number.  */
00092     TARGET_SIGNAL_POLL = 33,
00093     TARGET_SIGNAL_WIND = 34,
00094     TARGET_SIGNAL_PHONE = 35,
00095     TARGET_SIGNAL_WAITING = 36,
00096     TARGET_SIGNAL_LWP = 37,
00097     TARGET_SIGNAL_DANGER = 38,
00098     TARGET_SIGNAL_GRANT = 39,
00099     TARGET_SIGNAL_RETRACT = 40,
00100     TARGET_SIGNAL_MSG = 41,
00101     TARGET_SIGNAL_SOUND = 42,
00102     TARGET_SIGNAL_SAK = 43,
00103     TARGET_SIGNAL_PRIO = 44,
00104     TARGET_SIGNAL_REALTIME_33 = 45,
00105     TARGET_SIGNAL_REALTIME_34 = 46,
00106     TARGET_SIGNAL_REALTIME_35 = 47,
00107     TARGET_SIGNAL_REALTIME_36 = 48,
00108     TARGET_SIGNAL_REALTIME_37 = 49,
00109     TARGET_SIGNAL_REALTIME_38 = 50,
00110     TARGET_SIGNAL_REALTIME_39 = 51,
00111     TARGET_SIGNAL_REALTIME_40 = 52,
00112     TARGET_SIGNAL_REALTIME_41 = 53,
00113     TARGET_SIGNAL_REALTIME_42 = 54,
00114     TARGET_SIGNAL_REALTIME_43 = 55,
00115     TARGET_SIGNAL_REALTIME_44 = 56,
00116     TARGET_SIGNAL_REALTIME_45 = 57,
00117     TARGET_SIGNAL_REALTIME_46 = 58,
00118     TARGET_SIGNAL_REALTIME_47 = 59,
00119     TARGET_SIGNAL_REALTIME_48 = 60,
00120     TARGET_SIGNAL_REALTIME_49 = 61,
00121     TARGET_SIGNAL_REALTIME_50 = 62,
00122     TARGET_SIGNAL_REALTIME_51 = 63,
00123     TARGET_SIGNAL_REALTIME_52 = 64,
00124     TARGET_SIGNAL_REALTIME_53 = 65,
00125     TARGET_SIGNAL_REALTIME_54 = 66,
00126     TARGET_SIGNAL_REALTIME_55 = 67,
00127     TARGET_SIGNAL_REALTIME_56 = 68,
00128     TARGET_SIGNAL_REALTIME_57 = 69,
00129     TARGET_SIGNAL_REALTIME_58 = 70,
00130     TARGET_SIGNAL_REALTIME_59 = 71,
00131     TARGET_SIGNAL_REALTIME_60 = 72,
00132     TARGET_SIGNAL_REALTIME_61 = 73,
00133     TARGET_SIGNAL_REALTIME_62 = 74,
00134     TARGET_SIGNAL_REALTIME_63 = 75,
00135 
00136     /* Used internally by Solaris threads.  See signal(5) on Solaris.  */
00137     TARGET_SIGNAL_CANCEL = 76,
00138 
00139     /* Yes, this pains me, too.  But LynxOS didn't have SIG32, and now
00140        GNU/Linux does, and we can't disturb the numbering, since it's
00141        part of the remote protocol.  Note that in some GDB's
00142        TARGET_SIGNAL_REALTIME_32 is number 76.  */
00143     TARGET_SIGNAL_REALTIME_32,
00144     /* Yet another pain, IRIX 6 has SIG64. */
00145     TARGET_SIGNAL_REALTIME_64,
00146     /* Yet another pain, GNU/Linux MIPS might go up to 128. */
00147     TARGET_SIGNAL_REALTIME_65,
00148     TARGET_SIGNAL_REALTIME_66,
00149     TARGET_SIGNAL_REALTIME_67,
00150     TARGET_SIGNAL_REALTIME_68,
00151     TARGET_SIGNAL_REALTIME_69,
00152     TARGET_SIGNAL_REALTIME_70,
00153     TARGET_SIGNAL_REALTIME_71,
00154     TARGET_SIGNAL_REALTIME_72,
00155     TARGET_SIGNAL_REALTIME_73,
00156     TARGET_SIGNAL_REALTIME_74,
00157     TARGET_SIGNAL_REALTIME_75,
00158     TARGET_SIGNAL_REALTIME_76,
00159     TARGET_SIGNAL_REALTIME_77,
00160     TARGET_SIGNAL_REALTIME_78,
00161     TARGET_SIGNAL_REALTIME_79,
00162     TARGET_SIGNAL_REALTIME_80,
00163     TARGET_SIGNAL_REALTIME_81,
00164     TARGET_SIGNAL_REALTIME_82,
00165     TARGET_SIGNAL_REALTIME_83,
00166     TARGET_SIGNAL_REALTIME_84,
00167     TARGET_SIGNAL_REALTIME_85,
00168     TARGET_SIGNAL_REALTIME_86,
00169     TARGET_SIGNAL_REALTIME_87,
00170     TARGET_SIGNAL_REALTIME_88,
00171     TARGET_SIGNAL_REALTIME_89,
00172     TARGET_SIGNAL_REALTIME_90,
00173     TARGET_SIGNAL_REALTIME_91,
00174     TARGET_SIGNAL_REALTIME_92,
00175     TARGET_SIGNAL_REALTIME_93,
00176     TARGET_SIGNAL_REALTIME_94,
00177     TARGET_SIGNAL_REALTIME_95,
00178     TARGET_SIGNAL_REALTIME_96,
00179     TARGET_SIGNAL_REALTIME_97,
00180     TARGET_SIGNAL_REALTIME_98,
00181     TARGET_SIGNAL_REALTIME_99,
00182     TARGET_SIGNAL_REALTIME_100,
00183     TARGET_SIGNAL_REALTIME_101,
00184     TARGET_SIGNAL_REALTIME_102,
00185     TARGET_SIGNAL_REALTIME_103,
00186     TARGET_SIGNAL_REALTIME_104,
00187     TARGET_SIGNAL_REALTIME_105,
00188     TARGET_SIGNAL_REALTIME_106,
00189     TARGET_SIGNAL_REALTIME_107,
00190     TARGET_SIGNAL_REALTIME_108,
00191     TARGET_SIGNAL_REALTIME_109,
00192     TARGET_SIGNAL_REALTIME_110,
00193     TARGET_SIGNAL_REALTIME_111,
00194     TARGET_SIGNAL_REALTIME_112,
00195     TARGET_SIGNAL_REALTIME_113,
00196     TARGET_SIGNAL_REALTIME_114,
00197     TARGET_SIGNAL_REALTIME_115,
00198     TARGET_SIGNAL_REALTIME_116,
00199     TARGET_SIGNAL_REALTIME_117,
00200     TARGET_SIGNAL_REALTIME_118,
00201     TARGET_SIGNAL_REALTIME_119,
00202     TARGET_SIGNAL_REALTIME_120,
00203     TARGET_SIGNAL_REALTIME_121,
00204     TARGET_SIGNAL_REALTIME_122,
00205     TARGET_SIGNAL_REALTIME_123,
00206     TARGET_SIGNAL_REALTIME_124,
00207     TARGET_SIGNAL_REALTIME_125,
00208     TARGET_SIGNAL_REALTIME_126,
00209     TARGET_SIGNAL_REALTIME_127,
00210 
00211     TARGET_SIGNAL_INFO,
00212 
00213     /* Some signal we don't know about.  */
00214     TARGET_SIGNAL_UNKNOWN,
00215 
00216     /* Use whatever signal we use when one is not specifically specified
00217        (for passing to proceed and so on).  */
00218     TARGET_SIGNAL_DEFAULT,
00219 
00220     /* Mach exceptions.  In versions of GDB before 5.2, these were just before
00221        TARGET_SIGNAL_INFO if you were compiling on a Mach host (and missing
00222        otherwise).  */
00223     TARGET_EXC_BAD_ACCESS,
00224     TARGET_EXC_BAD_INSTRUCTION,
00225     TARGET_EXC_ARITHMETIC,
00226     TARGET_EXC_EMULATION,
00227     TARGET_EXC_SOFTWARE,
00228     TARGET_EXC_BREAKPOINT,
00229 
00230     /* If you are adding a new signal, add it just above this comment.  */
00231 
00232     /* Last and unused enum value, for sizing arrays, etc.  */
00233     TARGET_SIGNAL_LAST
00234   };
00235 
00236 #endif /* #ifndef GDB_SIGNALS_H */