1 /// Cross-platform signal numbers defined by the GDB Remote Serial Protocol.
2 ///
3 /// Transcribed from <https://github.com/bminor/binutils-gdb/blob/master/include/gdb/signals.def>
4 #[repr(transparent)]
5 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6 pub struct Signal(pub u8);
7 
8 #[allow(clippy::upper_case_acronyms)]
9 #[allow(non_camel_case_types)]
10 #[rustfmt::skip]
11 impl Signal {
12     #[doc = "Signal 0 (shouldn't be used)"]    pub const SIGZERO:    Self = Self(0);
13     #[doc = "Hangup"]                          pub const SIGHUP:     Self = Self(1);
14     #[doc = "Interrupt"]                       pub const SIGINT:     Self = Self(2);
15     #[doc = "Quit"]                            pub const SIGQUIT:    Self = Self(3);
16     #[doc = "Illegal instruction"]             pub const SIGILL:     Self = Self(4);
17     #[doc = "Trace/breakpoint trap"]           pub const SIGTRAP:    Self = Self(5);
18     #[doc = "Aborted"]                         pub const SIGABRT:    Self = Self(6);
19     #[doc = "Emulation trap"]                  pub const SIGEMT:     Self = Self(7);
20     #[doc = "Arithmetic exception"]            pub const SIGFPE:     Self = Self(8);
21     #[doc = "Killed"]                          pub const SIGKILL:    Self = Self(9);
22     #[doc = "Bus error"]                       pub const SIGBUS:     Self = Self(10);
23     #[doc = "Segmentation fault"]              pub const SIGSEGV:    Self = Self(11);
24     #[doc = "Bad system call"]                 pub const SIGSYS:     Self = Self(12);
25     #[doc = "Broken pipe"]                     pub const SIGPIPE:    Self = Self(13);
26     #[doc = "Alarm clock"]                     pub const SIGALRM:    Self = Self(14);
27     #[doc = "Terminated"]                      pub const SIGTERM:    Self = Self(15);
28     #[doc = "Urgent I/O condition"]            pub const SIGURG:     Self = Self(16);
29     #[doc = "Stopped (signal)"]                pub const SIGSTOP:    Self = Self(17);
30     #[doc = "Stopped (user)"]                  pub const SIGTSTP:    Self = Self(18);
31     #[doc = "Continued"]                       pub const SIGCONT:    Self = Self(19);
32     #[doc = "Child status changed"]            pub const SIGCHLD:    Self = Self(20);
33     #[doc = "Stopped (tty input)"]             pub const SIGTTIN:    Self = Self(21);
34     #[doc = "Stopped (tty output)"]            pub const SIGTTOU:    Self = Self(22);
35     #[doc = "I/O possible"]                    pub const SIGIO:      Self = Self(23);
36     #[doc = "CPU time limit exceeded"]         pub const SIGXCPU:    Self = Self(24);
37     #[doc = "File size limit exceeded"]        pub const SIGXFSZ:    Self = Self(25);
38     #[doc = "Virtual timer expired"]           pub const SIGVTALRM:  Self = Self(26);
39     #[doc = "Profiling timer expired"]         pub const SIGPROF:    Self = Self(27);
40     #[doc = "Window size changed"]             pub const SIGWINCH:   Self = Self(28);
41     #[doc = "Resource lost"]                   pub const SIGLOST:    Self = Self(29);
42     #[doc = "User defined signal 1"]           pub const SIGUSR1:    Self = Self(30);
43     #[doc = "User defined signal 2"]           pub const SIGUSR2:    Self = Self(31);
44     #[doc = "Power fail/restart"]              pub const SIGPWR:     Self = Self(32);
45     /* Similar to SIGIO.  Perhaps they should have the same number. */
46     #[doc = "Pollable event occurred"]         pub const SIGPOLL:    Self = Self(33);
47     #[doc = "SIGWIND"]                         pub const SIGWIND:    Self = Self(34);
48     #[doc = "SIGPHONE"]                        pub const SIGPHONE:   Self = Self(35);
49     #[doc = "Process's LWPs are blocked"]      pub const SIGWAITING: Self = Self(36);
50     #[doc = "Signal LWP"]                      pub const SIGLWP:     Self = Self(37);
51     #[doc = "Swap space dangerously low"]      pub const SIGDANGER:  Self = Self(38);
52     #[doc = "Monitor mode granted"]            pub const SIGGRANT:   Self = Self(39);
53     #[doc = "Need to relinquish monitor mode"] pub const SIGRETRACT: Self = Self(40);
54     #[doc = "Monitor mode data available"]     pub const SIGMSG:     Self = Self(41);
55     #[doc = "Sound completed"]                 pub const SIGSOUND:   Self = Self(42);
56     #[doc = "Secure attention"]                pub const SIGSAK:     Self = Self(43);
57     #[doc = "SIGPRIO"]                         pub const SIGPRIO:    Self = Self(44);
58     #[doc = "Real-time event 33"]              pub const SIG33:      Self = Self(45);
59     #[doc = "Real-time event 34"]              pub const SIG34:      Self = Self(46);
60     #[doc = "Real-time event 35"]              pub const SIG35:      Self = Self(47);
61     #[doc = "Real-time event 36"]              pub const SIG36:      Self = Self(48);
62     #[doc = "Real-time event 37"]              pub const SIG37:      Self = Self(49);
63     #[doc = "Real-time event 38"]              pub const SIG38:      Self = Self(50);
64     #[doc = "Real-time event 39"]              pub const SIG39:      Self = Self(51);
65     #[doc = "Real-time event 40"]              pub const SIG40:      Self = Self(52);
66     #[doc = "Real-time event 41"]              pub const SIG41:      Self = Self(53);
67     #[doc = "Real-time event 42"]              pub const SIG42:      Self = Self(54);
68     #[doc = "Real-time event 43"]              pub const SIG43:      Self = Self(55);
69     #[doc = "Real-time event 44"]              pub const SIG44:      Self = Self(56);
70     #[doc = "Real-time event 45"]              pub const SIG45:      Self = Self(57);
71     #[doc = "Real-time event 46"]              pub const SIG46:      Self = Self(58);
72     #[doc = "Real-time event 47"]              pub const SIG47:      Self = Self(59);
73     #[doc = "Real-time event 48"]              pub const SIG48:      Self = Self(60);
74     #[doc = "Real-time event 49"]              pub const SIG49:      Self = Self(61);
75     #[doc = "Real-time event 50"]              pub const SIG50:      Self = Self(62);
76     #[doc = "Real-time event 51"]              pub const SIG51:      Self = Self(63);
77     #[doc = "Real-time event 52"]              pub const SIG52:      Self = Self(64);
78     #[doc = "Real-time event 53"]              pub const SIG53:      Self = Self(65);
79     #[doc = "Real-time event 54"]              pub const SIG54:      Self = Self(66);
80     #[doc = "Real-time event 55"]              pub const SIG55:      Self = Self(67);
81     #[doc = "Real-time event 56"]              pub const SIG56:      Self = Self(68);
82     #[doc = "Real-time event 57"]              pub const SIG57:      Self = Self(69);
83     #[doc = "Real-time event 58"]              pub const SIG58:      Self = Self(70);
84     #[doc = "Real-time event 59"]              pub const SIG59:      Self = Self(71);
85     #[doc = "Real-time event 60"]              pub const SIG60:      Self = Self(72);
86     #[doc = "Real-time event 61"]              pub const SIG61:      Self = Self(73);
87     #[doc = "Real-time event 62"]              pub const SIG62:      Self = Self(74);
88     #[doc = "Real-time event 63"]              pub const SIG63:      Self = Self(75);
89     /* Used internally by Solaris threads.  See signal(5) on Solaris. */
90     #[doc = "LWP internal signal"]             pub const SIGCANCEL:  Self = Self(76);
91     /* Yes, this pains me, too.  But LynxOS didn't have SIG32, and now
92     GNU/Linux does, and we can't disturb the numbering, since it's
93     part of the remote protocol.  Note that in some GDB's
94     GDB_SIGNAL_REALTIME_32 is number 76.  */
95     #[doc = "Real-time event 32"]              pub const SIG32:      Self = Self(77);
96     /* Yet another pain, IRIX 6 has SIG64. */
97     #[doc = "Real-time event 64"]              pub const SIG64:      Self = Self(78);
98     /* Yet another pain, GNU/Linux MIPS might go up to 128. */
99     #[doc = "Real-time event 65"]              pub const SIG65:      Self = Self(79);
100     #[doc = "Real-time event 66"]              pub const SIG66:      Self = Self(80);
101     #[doc = "Real-time event 67"]              pub const SIG67:      Self = Self(81);
102     #[doc = "Real-time event 68"]              pub const SIG68:      Self = Self(82);
103     #[doc = "Real-time event 69"]              pub const SIG69:      Self = Self(83);
104     #[doc = "Real-time event 70"]              pub const SIG70:      Self = Self(84);
105     #[doc = "Real-time event 71"]              pub const SIG71:      Self = Self(85);
106     #[doc = "Real-time event 72"]              pub const SIG72:      Self = Self(86);
107     #[doc = "Real-time event 73"]              pub const SIG73:      Self = Self(87);
108     #[doc = "Real-time event 74"]              pub const SIG74:      Self = Self(88);
109     #[doc = "Real-time event 75"]              pub const SIG75:      Self = Self(89);
110     #[doc = "Real-time event 76"]              pub const SIG76:      Self = Self(90);
111     #[doc = "Real-time event 77"]              pub const SIG77:      Self = Self(91);
112     #[doc = "Real-time event 78"]              pub const SIG78:      Self = Self(92);
113     #[doc = "Real-time event 79"]              pub const SIG79:      Self = Self(93);
114     #[doc = "Real-time event 80"]              pub const SIG80:      Self = Self(94);
115     #[doc = "Real-time event 81"]              pub const SIG81:      Self = Self(95);
116     #[doc = "Real-time event 82"]              pub const SIG82:      Self = Self(96);
117     #[doc = "Real-time event 83"]              pub const SIG83:      Self = Self(97);
118     #[doc = "Real-time event 84"]              pub const SIG84:      Self = Self(98);
119     #[doc = "Real-time event 85"]              pub const SIG85:      Self = Self(99);
120     #[doc = "Real-time event 86"]              pub const SIG86:      Self = Self(100);
121     #[doc = "Real-time event 87"]              pub const SIG87:      Self = Self(101);
122     #[doc = "Real-time event 88"]              pub const SIG88:      Self = Self(102);
123     #[doc = "Real-time event 89"]              pub const SIG89:      Self = Self(103);
124     #[doc = "Real-time event 90"]              pub const SIG90:      Self = Self(104);
125     #[doc = "Real-time event 91"]              pub const SIG91:      Self = Self(105);
126     #[doc = "Real-time event 92"]              pub const SIG92:      Self = Self(106);
127     #[doc = "Real-time event 93"]              pub const SIG93:      Self = Self(107);
128     #[doc = "Real-time event 94"]              pub const SIG94:      Self = Self(108);
129     #[doc = "Real-time event 95"]              pub const SIG95:      Self = Self(109);
130     #[doc = "Real-time event 96"]              pub const SIG96:      Self = Self(110);
131     #[doc = "Real-time event 97"]              pub const SIG97:      Self = Self(111);
132     #[doc = "Real-time event 98"]              pub const SIG98:      Self = Self(112);
133     #[doc = "Real-time event 99"]              pub const SIG99:      Self = Self(113);
134     #[doc = "Real-time event 100"]             pub const SIG100:     Self = Self(114);
135     #[doc = "Real-time event 101"]             pub const SIG101:     Self = Self(115);
136     #[doc = "Real-time event 102"]             pub const SIG102:     Self = Self(116);
137     #[doc = "Real-time event 103"]             pub const SIG103:     Self = Self(117);
138     #[doc = "Real-time event 104"]             pub const SIG104:     Self = Self(118);
139     #[doc = "Real-time event 105"]             pub const SIG105:     Self = Self(119);
140     #[doc = "Real-time event 106"]             pub const SIG106:     Self = Self(120);
141     #[doc = "Real-time event 107"]             pub const SIG107:     Self = Self(121);
142     #[doc = "Real-time event 108"]             pub const SIG108:     Self = Self(122);
143     #[doc = "Real-time event 109"]             pub const SIG109:     Self = Self(123);
144     #[doc = "Real-time event 110"]             pub const SIG110:     Self = Self(124);
145     #[doc = "Real-time event 111"]             pub const SIG111:     Self = Self(125);
146     #[doc = "Real-time event 112"]             pub const SIG112:     Self = Self(126);
147     #[doc = "Real-time event 113"]             pub const SIG113:     Self = Self(127);
148     #[doc = "Real-time event 114"]             pub const SIG114:     Self = Self(128);
149     #[doc = "Real-time event 115"]             pub const SIG115:     Self = Self(129);
150     #[doc = "Real-time event 116"]             pub const SIG116:     Self = Self(130);
151     #[doc = "Real-time event 117"]             pub const SIG117:     Self = Self(131);
152     #[doc = "Real-time event 118"]             pub const SIG118:     Self = Self(132);
153     #[doc = "Real-time event 119"]             pub const SIG119:     Self = Self(133);
154     #[doc = "Real-time event 120"]             pub const SIG120:     Self = Self(134);
155     #[doc = "Real-time event 121"]             pub const SIG121:     Self = Self(135);
156     #[doc = "Real-time event 122"]             pub const SIG122:     Self = Self(136);
157     #[doc = "Real-time event 123"]             pub const SIG123:     Self = Self(137);
158     #[doc = "Real-time event 124"]             pub const SIG124:     Self = Self(138);
159     #[doc = "Real-time event 125"]             pub const SIG125:     Self = Self(139);
160     #[doc = "Real-time event 126"]             pub const SIG126:     Self = Self(140);
161     #[doc = "Real-time event 127"]             pub const SIG127:     Self = Self(141);
162 
163     #[doc = "Information request"]             pub const SIGINFO:    Self = Self(142);
164 
165     /* Some signal we don't know about. */
166     #[doc = "Unknown signal"]                  pub const UNKNOWN:    Self = Self(143);
167 
168     /* Use whatever signal we use when one is not specifically specified
169     (for passing to proceed and so on).  */
170     #[doc = "Internal error: printing GDB_SIGNAL_DEFAULT"]
171     pub const INTERNAL_DEFAULT: Self = Self(144);
172 
173     /* Mach exceptions.  In versions of GDB before 5.2, these were just before
174     GDB_SIGNAL_INFO if you were compiling on a Mach host (and missing
175     otherwise).  */
176     #[doc = "Could not access memory"]         pub const EXC_BAD_ACCESS:      Self = Self(145);
177     #[doc = "Illegal instruction/operand"]     pub const EXC_BAD_INSTRUCTION: Self = Self(146);
178     #[doc = "Arithmetic exception"]            pub const EXC_ARITHMETIC:      Self = Self(147);
179     #[doc = "Emulation instruction"]           pub const EXC_EMULATION:       Self = Self(148);
180     #[doc = "Software generated exception"]    pub const EXC_SOFTWARE:        Self = Self(149);
181     #[doc = "Breakpoint"]                      pub const EXC_BREAKPOINT:      Self = Self(150);
182 
183     #[doc = "librt internal signal"]           pub const SIGLIBRT:            Self = Self(151);
184 }
185 
186 impl core::fmt::Display for Signal {
fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result187     fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
188         #[rustfmt::skip]
189         let s = match *self {
190             Signal::SIGZERO             => "SIGZERO - Signal 0",
191             Signal::SIGHUP              => "SIGHUP - Hangup",
192             Signal::SIGINT              => "SIGINT - Interrupt",
193             Signal::SIGQUIT             => "SIGQUIT - Quit",
194             Signal::SIGILL              => "SIGILL - Illegal instruction",
195             Signal::SIGTRAP             => "SIGTRAP - Trace/breakpoint trap",
196             Signal::SIGABRT             => "SIGABRT - Aborted",
197             Signal::SIGEMT              => "SIGEMT - Emulation trap",
198             Signal::SIGFPE              => "SIGFPE - Arithmetic exception",
199             Signal::SIGKILL             => "SIGKILL - Killed",
200             Signal::SIGBUS              => "SIGBUS - Bus error",
201             Signal::SIGSEGV             => "SIGSEGV - Segmentation fault",
202             Signal::SIGSYS              => "SIGSYS - Bad system call",
203             Signal::SIGPIPE             => "SIGPIPE - Broken pipe",
204             Signal::SIGALRM             => "SIGALRM - Alarm clock",
205             Signal::SIGTERM             => "SIGTERM - Terminated",
206             Signal::SIGURG              => "SIGURG - Urgent I/O condition",
207             Signal::SIGSTOP             => "SIGSTOP - Stopped (signal)",
208             Signal::SIGTSTP             => "SIGTSTP - Stopped (user)",
209             Signal::SIGCONT             => "SIGCONT - Continued",
210             Signal::SIGCHLD             => "SIGCHLD - Child status changed",
211             Signal::SIGTTIN             => "SIGTTIN - Stopped (tty input)",
212             Signal::SIGTTOU             => "SIGTTOU - Stopped (tty output)",
213             Signal::SIGIO               => "SIGIO - I/O possible",
214             Signal::SIGXCPU             => "SIGXCPU - CPU time limit exceeded",
215             Signal::SIGXFSZ             => "SIGXFSZ - File size limit exceeded",
216             Signal::SIGVTALRM           => "SIGVTALRM - Virtual timer expired",
217             Signal::SIGPROF             => "SIGPROF - Profiling timer expired",
218             Signal::SIGWINCH            => "SIGWINCH - Window size changed",
219             Signal::SIGLOST             => "SIGLOST - Resource lost",
220             Signal::SIGUSR1             => "SIGUSR1 - User defined signal 1",
221             Signal::SIGUSR2             => "SIGUSR2 - User defined signal 2",
222             Signal::SIGPWR              => "SIGPWR - Power fail/restart",
223             Signal::SIGPOLL             => "SIGPOLL - Pollable event occurred",
224             Signal::SIGWIND             => "SIGWIND - SIGWIND",
225             Signal::SIGPHONE            => "SIGPHONE - SIGPHONE",
226             Signal::SIGWAITING          => "SIGWAITING - Process's LWPs are blocked",
227             Signal::SIGLWP              => "SIGLWP - Signal LWP",
228             Signal::SIGDANGER           => "SIGDANGER - Swap space dangerously low",
229             Signal::SIGGRANT            => "SIGGRANT - Monitor mode granted",
230             Signal::SIGRETRACT          => "SIGRETRACT - Need to relinquish monitor mode",
231             Signal::SIGMSG              => "SIGMSG - Monitor mode data available",
232             Signal::SIGSOUND            => "SIGSOUND - Sound completed",
233             Signal::SIGSAK              => "SIGSAK - Secure attention",
234             Signal::SIGPRIO             => "SIGPRIO - SIGPRIO",
235             Signal::SIG33               => "SIG33 - Real-time event 33",
236             Signal::SIG34               => "SIG34 - Real-time event 34",
237             Signal::SIG35               => "SIG35 - Real-time event 35",
238             Signal::SIG36               => "SIG36 - Real-time event 36",
239             Signal::SIG37               => "SIG37 - Real-time event 37",
240             Signal::SIG38               => "SIG38 - Real-time event 38",
241             Signal::SIG39               => "SIG39 - Real-time event 39",
242             Signal::SIG40               => "SIG40 - Real-time event 40",
243             Signal::SIG41               => "SIG41 - Real-time event 41",
244             Signal::SIG42               => "SIG42 - Real-time event 42",
245             Signal::SIG43               => "SIG43 - Real-time event 43",
246             Signal::SIG44               => "SIG44 - Real-time event 44",
247             Signal::SIG45               => "SIG45 - Real-time event 45",
248             Signal::SIG46               => "SIG46 - Real-time event 46",
249             Signal::SIG47               => "SIG47 - Real-time event 47",
250             Signal::SIG48               => "SIG48 - Real-time event 48",
251             Signal::SIG49               => "SIG49 - Real-time event 49",
252             Signal::SIG50               => "SIG50 - Real-time event 50",
253             Signal::SIG51               => "SIG51 - Real-time event 51",
254             Signal::SIG52               => "SIG52 - Real-time event 52",
255             Signal::SIG53               => "SIG53 - Real-time event 53",
256             Signal::SIG54               => "SIG54 - Real-time event 54",
257             Signal::SIG55               => "SIG55 - Real-time event 55",
258             Signal::SIG56               => "SIG56 - Real-time event 56",
259             Signal::SIG57               => "SIG57 - Real-time event 57",
260             Signal::SIG58               => "SIG58 - Real-time event 58",
261             Signal::SIG59               => "SIG59 - Real-time event 59",
262             Signal::SIG60               => "SIG60 - Real-time event 60",
263             Signal::SIG61               => "SIG61 - Real-time event 61",
264             Signal::SIG62               => "SIG62 - Real-time event 62",
265             Signal::SIG63               => "SIG63 - Real-time event 63",
266             Signal::SIGCANCEL           => "SIGCANCEL - LWP internal signal",
267             Signal::SIG32               => "SIG32 - Real-time event 32",
268             Signal::SIG64               => "SIG64 - Real-time event 64",
269             Signal::SIG65               => "SIG65 - Real-time event 65",
270             Signal::SIG66               => "SIG66 - Real-time event 66",
271             Signal::SIG67               => "SIG67 - Real-time event 67",
272             Signal::SIG68               => "SIG68 - Real-time event 68",
273             Signal::SIG69               => "SIG69 - Real-time event 69",
274             Signal::SIG70               => "SIG70 - Real-time event 70",
275             Signal::SIG71               => "SIG71 - Real-time event 71",
276             Signal::SIG72               => "SIG72 - Real-time event 72",
277             Signal::SIG73               => "SIG73 - Real-time event 73",
278             Signal::SIG74               => "SIG74 - Real-time event 74",
279             Signal::SIG75               => "SIG75 - Real-time event 75",
280             Signal::SIG76               => "SIG76 - Real-time event 76",
281             Signal::SIG77               => "SIG77 - Real-time event 77",
282             Signal::SIG78               => "SIG78 - Real-time event 78",
283             Signal::SIG79               => "SIG79 - Real-time event 79",
284             Signal::SIG80               => "SIG80 - Real-time event 80",
285             Signal::SIG81               => "SIG81 - Real-time event 81",
286             Signal::SIG82               => "SIG82 - Real-time event 82",
287             Signal::SIG83               => "SIG83 - Real-time event 83",
288             Signal::SIG84               => "SIG84 - Real-time event 84",
289             Signal::SIG85               => "SIG85 - Real-time event 85",
290             Signal::SIG86               => "SIG86 - Real-time event 86",
291             Signal::SIG87               => "SIG87 - Real-time event 87",
292             Signal::SIG88               => "SIG88 - Real-time event 88",
293             Signal::SIG89               => "SIG89 - Real-time event 89",
294             Signal::SIG90               => "SIG90 - Real-time event 90",
295             Signal::SIG91               => "SIG91 - Real-time event 91",
296             Signal::SIG92               => "SIG92 - Real-time event 92",
297             Signal::SIG93               => "SIG93 - Real-time event 93",
298             Signal::SIG94               => "SIG94 - Real-time event 94",
299             Signal::SIG95               => "SIG95 - Real-time event 95",
300             Signal::SIG96               => "SIG96 - Real-time event 96",
301             Signal::SIG97               => "SIG97 - Real-time event 97",
302             Signal::SIG98               => "SIG98 - Real-time event 98",
303             Signal::SIG99               => "SIG99 - Real-time event 99",
304             Signal::SIG100              => "SIG100 - Real-time event 100",
305             Signal::SIG101              => "SIG101 - Real-time event 101",
306             Signal::SIG102              => "SIG102 - Real-time event 102",
307             Signal::SIG103              => "SIG103 - Real-time event 103",
308             Signal::SIG104              => "SIG104 - Real-time event 104",
309             Signal::SIG105              => "SIG105 - Real-time event 105",
310             Signal::SIG106              => "SIG106 - Real-time event 106",
311             Signal::SIG107              => "SIG107 - Real-time event 107",
312             Signal::SIG108              => "SIG108 - Real-time event 108",
313             Signal::SIG109              => "SIG109 - Real-time event 109",
314             Signal::SIG110              => "SIG110 - Real-time event 110",
315             Signal::SIG111              => "SIG111 - Real-time event 111",
316             Signal::SIG112              => "SIG112 - Real-time event 112",
317             Signal::SIG113              => "SIG113 - Real-time event 113",
318             Signal::SIG114              => "SIG114 - Real-time event 114",
319             Signal::SIG115              => "SIG115 - Real-time event 115",
320             Signal::SIG116              => "SIG116 - Real-time event 116",
321             Signal::SIG117              => "SIG117 - Real-time event 117",
322             Signal::SIG118              => "SIG118 - Real-time event 118",
323             Signal::SIG119              => "SIG119 - Real-time event 119",
324             Signal::SIG120              => "SIG120 - Real-time event 120",
325             Signal::SIG121              => "SIG121 - Real-time event 121",
326             Signal::SIG122              => "SIG122 - Real-time event 122",
327             Signal::SIG123              => "SIG123 - Real-time event 123",
328             Signal::SIG124              => "SIG124 - Real-time event 124",
329             Signal::SIG125              => "SIG125 - Real-time event 125",
330             Signal::SIG126              => "SIG126 - Real-time event 126",
331             Signal::SIG127              => "SIG127 - Real-time event 127",
332             Signal::SIGINFO             => "SIGINFO - Information request",
333             Signal::UNKNOWN             => "UNKNOWN - Unknown signal",
334             Signal::INTERNAL_DEFAULT    => "INTERNAL_DEFAULT - Internal error: printing GDB_SIGNAL_DEFAULT",
335             Signal::EXC_BAD_ACCESS      => "EXC_BAD_ACCESS - Could not access memory",
336             Signal::EXC_BAD_INSTRUCTION => "EXC_BAD_INSTRUCTION - Illegal instruction/operand",
337             Signal::EXC_ARITHMETIC      => "EXC_ARITHMETIC - Arithmetic exception",
338             Signal::EXC_EMULATION       => "EXC_EMULATION - Emulation instruction",
339             Signal::EXC_SOFTWARE        => "EXC_SOFTWARE - Software generated exception",
340             Signal::EXC_BREAKPOINT      => "EXC_BREAKPOINT - Breakpoint",
341             Signal::SIGLIBRT            => "SIGLIBRT - librt internal signal",
342 
343             _ => "custom signal (not defined in GDB's signals.def file)"
344         };
345 
346         write!(f, "{}", s)
347     }
348 }
349