Rizin
unix-like reverse engineering framework and cli tools
sigutil.c
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2016 madprogrammer
2 // SPDX-FileCopyrightText: 2016 FSF Inc
3 // SPDX-License-Identifier: GPL-2.0-only
4 
5 #include <signal.h>
6 #include "gdb_signals.h"
7 #include "sigutil.h"
8 #include "utils.h"
9 
10 #define NTO_SIGHUP 1 /* hangup */
11 #define NTO_SIGINT 2 /* interrupt */
12 #define NTO_SIGQUIT 3 /* quit */
13 #define NTO_SIGILL 4 /* illegal instruction (not reset when caught) */
14 #define NTO_SIGTRAP 5 /* trace trap (not reset when caught) */
15 #define NTO_SIGIOT 6 /* IOT instruction */
16 #define NTO_SIGABRT 6 /* used by abort */
17 #define NTO_SIGEMT 7 /* EMT instruction */
18 #define NTO_SIGDEADLK 7 /* Mutex deadlock */
19 #define NTO_SIGFPE 8 /* floating point exception */
20 #define NTO_SIGKILL 9 /* kill (cannot be caught or ignored) */
21 #define NTO_SIGBUS 10 /* bus error */
22 #define NTO_SIGSEGV 11 /* segmentation violation */
23 #define NTO_SIGSYS 12 /* bad argument to system call */
24 #define NTO_SIGPIPE 13 /* write on pipe with no reader */
25 #define NTO_SIGALRM 14 /* real-time alarm clock */
26 #define NTO_SIGTERM 15 /* software termination signal from kill */
27 #define NTO_SIGUSR1 16 /* user defined signal 1 */
28 #define NTO_SIGUSR2 17 /* user defined signal 2 */
29 #define NTO_SIGCHLD 18 /* death of child */
30 #define NTO_SIGPWR 19 /* power-fail restart */
31 #define NTO_SIGWINCH 20 /* window change */
32 #define NTO_SIGURG 21 /* urgent condition on I/O channel */
33 #define NTO_SIGPOLL 22 /* System V name for NTO_SIGIO */
34 #define NTO_SIGIO NTO_SIGPOLL
35 #define NTO_SIGSTOP 23 /* sendable stop signal not from tty */
36 #define NTO_SIGTSTP 24 /* stop signal from tty */
37 #define NTO_SIGCONT 25 /* continue a stopped process */
38 #define NTO_SIGTTIN 26 /* attempted background tty read */
39 #define NTO_SIGTTOU 27 /* attempted background tty write */
40 #define NTO_SIGVTALRM 28 /* virtual timer expired */
41 #define NTO_SIGPROF 29 /* profileing timer expired */
42 #define NTO_SIGXCPU 30 /* exceded cpu limit */
43 #define NTO_SIGXFSZ 31 /* exceded file size limit */
44 #define NTO_SIGRTMIN 41 /* Realtime signal 41 (SIGRTMIN) */
45 #define NTO_SIGRTMAX 56 /* Realtime signal 56 (SIGRTMAX) */
46 #define NTO_SIGSELECT (NTO_SIGRTMAX + 1)
47 #define NTO_SIGPHOTON (NTO_SIGRTMAX + 2)
48 
49 static struct
50 {
51  int nto_sig;
53 } sig_map[] = {
85 };
86 
87 /* Convert host signal to our signals. */
88 enum target_signal
89 target_signal_from_host(int hostsig) {
90  /* A switch statement would make sense but would require special kludges
91  to deal with the cases where more than one signal has the same number. */
92 
93  if (hostsig == 0)
94  return TARGET_SIGNAL_0;
95 
96 #if defined(SIGHUP)
97  if (hostsig == SIGHUP)
98  return TARGET_SIGNAL_HUP;
99 #endif
100 #if defined(SIGINT)
101  if (hostsig == SIGINT)
102  return TARGET_SIGNAL_INT;
103 #endif
104 #if defined(SIGQUIT)
105  if (hostsig == SIGQUIT)
106  return TARGET_SIGNAL_QUIT;
107 #endif
108 #if defined(SIGILL)
109  if (hostsig == SIGILL)
110  return TARGET_SIGNAL_ILL;
111 #endif
112 #if defined(SIGTRAP)
113  if (hostsig == SIGTRAP)
114  return TARGET_SIGNAL_TRAP;
115 #endif
116 #if defined(SIGABRT)
117  if (hostsig == SIGABRT)
118  return TARGET_SIGNAL_ABRT;
119 #endif
120 #if defined(SIGEMT)
121  if (hostsig == SIGEMT)
122  return TARGET_SIGNAL_EMT;
123 #endif
124 #if defined(SIGFPE)
125  if (hostsig == SIGFPE)
126  return TARGET_SIGNAL_FPE;
127 #endif
128 #if defined(SIGKILL)
129  if (hostsig == SIGKILL)
130  return TARGET_SIGNAL_KILL;
131 #endif
132 #if defined(SIGBUS)
133  if (hostsig == SIGBUS)
134  return TARGET_SIGNAL_BUS;
135 #endif
136 #if defined(SIGSEGV)
137  if (hostsig == SIGSEGV)
138  return TARGET_SIGNAL_SEGV;
139 #endif
140 #if defined(SIGSYS)
141  if (hostsig == SIGSYS)
142  return TARGET_SIGNAL_SYS;
143 #endif
144 #if defined(SIGPIPE)
145  if (hostsig == SIGPIPE)
146  return TARGET_SIGNAL_PIPE;
147 #endif
148 #if defined(SIGALRM)
149  if (hostsig == SIGALRM)
150  return TARGET_SIGNAL_ALRM;
151 #endif
152 #if defined(SIGTERM)
153  if (hostsig == SIGTERM)
154  return TARGET_SIGNAL_TERM;
155 #endif
156 #if defined(SIGUSR1)
157  if (hostsig == SIGUSR1)
158  return TARGET_SIGNAL_USR1;
159 #endif
160 #if defined(SIGUSR2)
161  if (hostsig == SIGUSR2)
162  return TARGET_SIGNAL_USR2;
163 #endif
164 #if defined(SIGCLD)
165  if (hostsig == SIGCLD)
166  return TARGET_SIGNAL_CHLD;
167 #endif
168 #if defined(SIGCHLD)
169  if (hostsig == SIGCHLD)
170  return TARGET_SIGNAL_CHLD;
171 #endif
172 #if defined(SIGPWR)
173  if (hostsig == SIGPWR)
174  return TARGET_SIGNAL_PWR;
175 #endif
176 #if defined(SIGWINCH)
177  if (hostsig == SIGWINCH)
178  return TARGET_SIGNAL_WINCH;
179 #endif
180 #if defined(SIGURG)
181  if (hostsig == SIGURG)
182  return TARGET_SIGNAL_URG;
183 #endif
184 #if defined(SIGIO)
185  if (hostsig == SIGIO)
186  return TARGET_SIGNAL_IO;
187 #endif
188 #if defined(SIGPOLL)
189  if (hostsig == SIGPOLL)
190  return TARGET_SIGNAL_POLL;
191 #endif
192 #if defined(SIGSTOP)
193  if (hostsig == SIGSTOP)
194  return TARGET_SIGNAL_STOP;
195 #endif
196 #if defined(SIGTSTP)
197  if (hostsig == SIGTSTP)
198  return TARGET_SIGNAL_TSTP;
199 #endif
200 #if defined(SIGCONT)
201  if (hostsig == SIGCONT)
202  return TARGET_SIGNAL_CONT;
203 #endif
204 #if defined(SIGTTIN)
205  if (hostsig == SIGTTIN)
206  return TARGET_SIGNAL_TTIN;
207 #endif
208 #if defined(SIGTTOU)
209  if (hostsig == SIGTTOU)
210  return TARGET_SIGNAL_TTOU;
211 #endif
212 #if defined(SIGVTALRM)
213  if (hostsig == SIGVTALRM)
214  return TARGET_SIGNAL_VTALRM;
215 #endif
216 #if defined(SIGPROF)
217  if (hostsig == SIGPROF)
218  return TARGET_SIGNAL_PROF;
219 #endif
220 #if defined(SIGXCPU)
221  if (hostsig == SIGXCPU)
222  return TARGET_SIGNAL_XCPU;
223 #endif
224 #if defined(SIGXFSZ)
225  if (hostsig == SIGXFSZ)
226  return TARGET_SIGNAL_XFSZ;
227 #endif
228 #if defined(SIGWIND)
229  if (hostsig == SIGWIND)
230  return TARGET_SIGNAL_WIND;
231 #endif
232 #if defined(SIGPHONE)
233  if (hostsig == SIGPHONE)
234  return TARGET_SIGNAL_PHONE;
235 #endif
236 #if defined(SIGLOST)
237  if (hostsig == SIGLOST)
238  return TARGET_SIGNAL_LOST;
239 #endif
240 #if defined(SIGWAITING)
241  if (hostsig == SIGWAITING)
242  return TARGET_SIGNAL_WAITING;
243 #endif
244 #if defined(SIGCANCEL)
245  if (hostsig == SIGCANCEL)
246  return TARGET_SIGNAL_CANCEL;
247 #endif
248 #if defined(SIGLWP)
249  if (hostsig == SIGLWP)
250  return TARGET_SIGNAL_LWP;
251 #endif
252 #if defined(SIGDANGER)
253  if (hostsig == SIGDANGER)
254  return TARGET_SIGNAL_DANGER;
255 #endif
256 #if defined(SIGGRANT)
257  if (hostsig == SIGGRANT)
258  return TARGET_SIGNAL_GRANT;
259 #endif
260 #if defined(SIGRETRACT)
261  if (hostsig == SIGRETRACT)
262  return TARGET_SIGNAL_RETRACT;
263 #endif
264 #if defined(SIGMSG)
265  if (hostsig == SIGMSG)
266  return TARGET_SIGNAL_MSG;
267 #endif
268 #if defined(SIGSOUND)
269  if (hostsig == SIGSOUND)
270  return TARGET_SIGNAL_SOUND;
271 #endif
272 #if defined(SIGSAK)
273  if (hostsig == SIGSAK)
274  return TARGET_SIGNAL_SAK;
275 #endif
276 #if defined(SIGPRzIO)
277  if (hostsig == SIGPRzIO)
278  return TARGET_SIGNAL_PRzIO;
279 #endif
280 
281 /* Mach exceptions. Assumes that the values for EXC_ are positive! */
282 #if defined(EXC_BAD_ACCESS) && defined(_NSIG)
283  if (hostsig == _NSIG + EXC_BAD_ACCESS)
284  return TARGET_EXC_BAD_ACCESS;
285 #endif
286 #if defined(EXC_BAD_INSTRUCTION) && defined(_NSIG)
287  if (hostsig == _NSIG + EXC_BAD_INSTRUCTION)
289 #endif
290 #if defined(EXC_ARITHMETIC) && defined(_NSIG)
291  if (hostsig == _NSIG + EXC_ARITHMETIC)
292  return TARGET_EXC_ARITHMETIC;
293 #endif
294 #if defined(EXC_EMULATION) && defined(_NSIG)
295  if (hostsig == _NSIG + EXC_EMULATION)
296  return TARGET_EXC_EMULATION;
297 #endif
298 #if defined(EXC_SOFTWARE) && defined(_NSIG)
299  if (hostsig == _NSIG + EXC_SOFTWARE)
300  return TARGET_EXC_SOFTWARE;
301 #endif
302 #if defined(EXC_BREAKPOINT) && defined(_NSIG)
303  if (hostsig == _NSIG + EXC_BREAKPOINT)
304  return TARGET_EXC_BREAKPOINT;
305 #endif
306 
307 #if defined(SIGINFO)
308  if (hostsig == SIGINFO)
309  return TARGET_SIGNAL_INFO;
310 #endif
311 
312 #if defined(REALTIME_LO)
313  if (hostsig >= REALTIME_LO && hostsig < REALTIME_HI) {
314  /* This block of TARGET_SIGNAL_REALTIME value is in order. */
315  if (33 <= hostsig && hostsig <= 63)
316  return (enum target_signal)(hostsig - 33 + (int)TARGET_SIGNAL_REALTIME_33);
317  else if (hostsig == 32)
319  else if (64 <= hostsig && hostsig <= 127)
320  return (enum target_signal)(hostsig - 64 + (int)TARGET_SIGNAL_REALTIME_64);
321  else
322  error("GDB bug: target.c (target_signal_from_host): unrecognized real-time signal");
323  }
324 #endif
325 
326  return TARGET_SIGNAL_UNKNOWN;
327 }
328 
329 static int
331  int *oursig_ok) {
332  int retsig;
333  /* Silence the 'not used' warning, for targets that
334  do not support signals. */
335  (void)retsig;
336 
337  *oursig_ok = 1;
338  switch (oursig) {
339  case TARGET_SIGNAL_0:
340  return 0;
341 
342 #if defined(SIGHUP)
343  case TARGET_SIGNAL_HUP:
344  return SIGHUP;
345 #endif
346 #if defined(SIGINT)
347  case TARGET_SIGNAL_INT:
348  return SIGINT;
349 #endif
350 #if defined(SIGQUIT)
351  case TARGET_SIGNAL_QUIT:
352  return SIGQUIT;
353 #endif
354 #if defined(SIGILL)
355  case TARGET_SIGNAL_ILL:
356  return SIGILL;
357 #endif
358 #if defined(SIGTRAP)
359  case TARGET_SIGNAL_TRAP:
360  return SIGTRAP;
361 #endif
362 #if defined(SIGABRT)
363  case TARGET_SIGNAL_ABRT:
364  return SIGABRT;
365 #endif
366 #if defined(SIGEMT)
367  case TARGET_SIGNAL_EMT:
368  return SIGEMT;
369 #endif
370 #if defined(SIGFPE)
371  case TARGET_SIGNAL_FPE:
372  return SIGFPE;
373 #endif
374 #if defined(SIGKILL)
375  case TARGET_SIGNAL_KILL:
376  return SIGKILL;
377 #endif
378 #if defined(SIGBUS)
379  case TARGET_SIGNAL_BUS:
380  return SIGBUS;
381 #endif
382 #if defined(SIGSEGV)
383  case TARGET_SIGNAL_SEGV:
384  return SIGSEGV;
385 #endif
386 #if defined(SIGSYS)
387  case TARGET_SIGNAL_SYS:
388  return SIGSYS;
389 #endif
390 #if defined(SIGPIPE)
391  case TARGET_SIGNAL_PIPE:
392  return SIGPIPE;
393 #endif
394 #if defined(SIGALRM)
395  case TARGET_SIGNAL_ALRM:
396  return SIGALRM;
397 #endif
398 #if defined(SIGTERM)
399  case TARGET_SIGNAL_TERM:
400  return SIGTERM;
401 #endif
402 #if defined(SIGUSR1)
403  case TARGET_SIGNAL_USR1:
404  return SIGUSR1;
405 #endif
406 #if defined(SIGUSR2)
407  case TARGET_SIGNAL_USR2:
408  return SIGUSR2;
409 #endif
410 #if defined(SIGCHLD) || defined(SIGCLD)
411  case TARGET_SIGNAL_CHLD:
412 #if defined(SIGCHLD)
413  return SIGCHLD;
414 #else
415  return SIGCLD;
416 #endif
417 #endif /* SIGCLD or SIGCHLD */
418 #if defined(SIGPWR)
419  case TARGET_SIGNAL_PWR:
420  return SIGPWR;
421 #endif
422 #if defined(SIGWINCH)
423  case TARGET_SIGNAL_WINCH:
424  return SIGWINCH;
425 #endif
426 #if defined(SIGURG)
427  case TARGET_SIGNAL_URG:
428  return SIGURG;
429 #endif
430 #if defined(SIGIO)
431  case TARGET_SIGNAL_IO:
432  return SIGIO;
433 #endif
434 #if defined(SIGPOLL)
435  case TARGET_SIGNAL_POLL:
436  return SIGPOLL;
437 #endif
438 #if defined(SIGSTOP)
439  case TARGET_SIGNAL_STOP:
440  return SIGSTOP;
441 #endif
442 #if defined(SIGTSTP)
443  case TARGET_SIGNAL_TSTP:
444  return SIGTSTP;
445 #endif
446 #if defined(SIGCONT)
447  case TARGET_SIGNAL_CONT:
448  return SIGCONT;
449 #endif
450 #if defined(SIGTTIN)
451  case TARGET_SIGNAL_TTIN:
452  return SIGTTIN;
453 #endif
454 #if defined(SIGTTOU)
455  case TARGET_SIGNAL_TTOU:
456  return SIGTTOU;
457 #endif
458 #if defined(SIGVTALRM)
460  return SIGVTALRM;
461 #endif
462 #if defined(SIGPROF)
463  case TARGET_SIGNAL_PROF:
464  return SIGPROF;
465 #endif
466 #if defined(SIGXCPU)
467  case TARGET_SIGNAL_XCPU:
468  return SIGXCPU;
469 #endif
470 #if defined(SIGXFSZ)
471  case TARGET_SIGNAL_XFSZ:
472  return SIGXFSZ;
473 #endif
474 #if defined(SIGWIND)
475  case TARGET_SIGNAL_WIND:
476  return SIGWIND;
477 #endif
478 #if defined(SIGPHONE)
479  case TARGET_SIGNAL_PHONE:
480  return SIGPHONE;
481 #endif
482 #if defined(SIGLOST)
483  case TARGET_SIGNAL_LOST:
484  return SIGLOST;
485 #endif
486 #if defined(SIGWAITING)
488  return SIGWAITING;
489 #endif
490 #if defined(SIGCANCEL)
492  return SIGCANCEL;
493 #endif
494 #if defined(SIGLWP)
495  case TARGET_SIGNAL_LWP:
496  return SIGLWP;
497 #endif
498 #if defined(SIGDANGER)
500  return SIGDANGER;
501 #endif
502 #if defined(SIGGRANT)
503  case TARGET_SIGNAL_GRANT:
504  return SIGGRANT;
505 #endif
506 #if defined(SIGRETRACT)
508  return SIGRETRACT;
509 #endif
510 #if defined(SIGMSG)
511  case TARGET_SIGNAL_MSG:
512  return SIGMSG;
513 #endif
514 #if defined(SIGSOUND)
515  case TARGET_SIGNAL_SOUND:
516  return SIGSOUND;
517 #endif
518 #if defined(SIGSAK)
519  case TARGET_SIGNAL_SAK:
520  return SIGSAK;
521 #endif
522 #if defined(SIGPRzIO)
523  case TARGET_SIGNAL_PRzIO:
524  return SIGPRzIO;
525 #endif
526 
527 /* Mach exceptions. Assumes that the values for EXC_ are positive! */
528 #if defined(EXC_BAD_ACCESS) && defined(_NSIG)
530  return _NSIG + EXC_BAD_ACCESS;
531 #endif
532 #if defined(EXC_BAD_INSTRUCTION) && defined(_NSIG)
534  return _NSIG + EXC_BAD_INSTRUCTION;
535 #endif
536 #if defined(EXC_ARITHMETIC) && defined(_NSIG)
538  return _NSIG + EXC_ARITHMETIC;
539 #endif
540 #if defined(EXC_EMULATION) && defined(_NSIG)
542  return _NSIG + EXC_EMULATION;
543 #endif
544 #if defined(EXC_SOFTWARE) && defined(_NSIG)
545  case TARGET_EXC_SOFTWARE:
546  return _NSIG + EXC_SOFTWARE;
547 #endif
548 #if defined(EXC_BREAKPOINT) && defined(_NSIG)
550  return _NSIG + EXC_BREAKPOINT;
551 #endif
552 
553 #if defined(SIGINFO)
554  case TARGET_SIGNAL_INFO:
555  return SIGINFO;
556 #endif
557 
558  default:
559 #if defined(REALTIME_LO)
560  retsig = 0;
561 
562  if (oursig >= TARGET_SIGNAL_REALTIME_33 && oursig <= TARGET_SIGNAL_REALTIME_63) {
563  /* This block of signals is continuous, and
564  TARGET_SIGNAL_REALTIME_33 is 33 by definition. */
565  retsig = (int)oursig - (int)TARGET_SIGNAL_REALTIME_33 + 33;
566  } else if (oursig == TARGET_SIGNAL_REALTIME_32) {
567  /* TARGET_SIGNAL_REALTIME_32 isn't contiguous with
568  TARGET_SIGNAL_REALTIME_33. It is 32 by definition. */
569  retsig = 32;
570  } else if (oursig >= TARGET_SIGNAL_REALTIME_64 && oursig <= TARGET_SIGNAL_REALTIME_127) {
571  /* This block of signals is continuous, and
572  TARGET_SIGNAL_REALTIME_64 is 64 by definition. */
573  retsig = (int)oursig - (int)TARGET_SIGNAL_REALTIME_64 + 64;
574  }
575 
576  if (retsig >= REALTIME_LO && retsig < REALTIME_HI)
577  return retsig;
578 #endif
579 
580  *oursig_ok = 0;
581  return 0;
582  }
583 }
584 
586  int oursig_ok;
587  int targ_signo = do_target_signal_to_host(oursig, &oursig_ok);
588  if (!oursig_ok)
589  return 0;
590  else
591  return targ_signo;
592 }
593 
594 /* Convert nto signal to gdb signal. */
595 enum target_signal
596 target_signal_from_nto(int sig) {
597  int i;
598  if (sig == 0)
599  return 0;
600 
601  for (i = 0; i != ARRAY_SIZE(sig_map); i++) {
602  if (sig_map[i].nto_sig == sig)
603  return sig_map[i].gdb_sig;
604  }
605 
606  if (sig >= NTO_SIGRTMIN && sig <= NTO_SIGRTMAX)
608  return target_signal_from_host(sig);
609 }
610 
611 int host_signal_from_nto(int sig) {
613 }
#define ARRAY_SIZE(a)
lzma_index ** i
Definition: index.h:629
#define SIGKILL
target_signal
Definition: gdb_signals.h:54
@ TARGET_SIGNAL_GRANT
Definition: gdb_signals.h:98
@ TARGET_SIGNAL_LOST
Definition: gdb_signals.h:87
@ TARGET_SIGNAL_BUS
Definition: gdb_signals.h:68
@ TARGET_EXC_ARITHMETIC
Definition: gdb_signals.h:225
@ TARGET_SIGNAL_PHONE
Definition: gdb_signals.h:94
@ TARGET_SIGNAL_REALTIME_33
Definition: gdb_signals.h:104
@ TARGET_SIGNAL_HUP
Definition: gdb_signals.h:59
@ TARGET_SIGNAL_REALTIME_41
Definition: gdb_signals.h:112
@ TARGET_SIGNAL_ALRM
Definition: gdb_signals.h:72
@ TARGET_EXC_EMULATION
Definition: gdb_signals.h:226
@ TARGET_SIGNAL_QUIT
Definition: gdb_signals.h:61
@ TARGET_SIGNAL_ILL
Definition: gdb_signals.h:62
@ TARGET_SIGNAL_EMT
Definition: gdb_signals.h:65
@ TARGET_SIGNAL_CHLD
Definition: gdb_signals.h:78
@ TARGET_SIGNAL_MSG
Definition: gdb_signals.h:100
@ TARGET_SIGNAL_TTIN
Definition: gdb_signals.h:79
@ TARGET_SIGNAL_DANGER
Definition: gdb_signals.h:97
@ TARGET_SIGNAL_ABRT
Definition: gdb_signals.h:64
@ TARGET_SIGNAL_TTOU
Definition: gdb_signals.h:80
@ TARGET_SIGNAL_KILL
Definition: gdb_signals.h:67
@ TARGET_SIGNAL_USR2
Definition: gdb_signals.h:89
@ TARGET_SIGNAL_TERM
Definition: gdb_signals.h:73
@ TARGET_SIGNAL_REALTIME_64
Definition: gdb_signals.h:145
@ TARGET_SIGNAL_PRzIO
Definition: gdb_signals.h:103
@ TARGET_SIGNAL_TRAP
Definition: gdb_signals.h:63
@ TARGET_SIGNAL_CONT
Definition: gdb_signals.h:77
@ TARGET_SIGNAL_LWP
Definition: gdb_signals.h:96
@ TARGET_SIGNAL_SAK
Definition: gdb_signals.h:102
@ TARGET_SIGNAL_PWR
Definition: gdb_signals.h:90
@ TARGET_SIGNAL_XCPU
Definition: gdb_signals.h:82
@ TARGET_SIGNAL_WAITING
Definition: gdb_signals.h:95
@ TARGET_SIGNAL_RETRACT
Definition: gdb_signals.h:99
@ TARGET_SIGNAL_USR1
Definition: gdb_signals.h:88
@ TARGET_SIGNAL_POLL
Definition: gdb_signals.h:92
@ TARGET_SIGNAL_SEGV
Definition: gdb_signals.h:69
@ TARGET_SIGNAL_FPE
Definition: gdb_signals.h:66
@ TARGET_SIGNAL_URG
Definition: gdb_signals.h:74
@ TARGET_SIGNAL_XFSZ
Definition: gdb_signals.h:83
@ TARGET_SIGNAL_0
Definition: gdb_signals.h:57
@ TARGET_EXC_SOFTWARE
Definition: gdb_signals.h:227
@ TARGET_SIGNAL_INT
Definition: gdb_signals.h:60
@ TARGET_EXC_BREAKPOINT
Definition: gdb_signals.h:228
@ TARGET_SIGNAL_WINCH
Definition: gdb_signals.h:86
@ TARGET_SIGNAL_VTALRM
Definition: gdb_signals.h:84
@ TARGET_EXC_BAD_INSTRUCTION
Definition: gdb_signals.h:224
@ TARGET_SIGNAL_REALTIME_63
Definition: gdb_signals.h:134
@ TARGET_EXC_BAD_ACCESS
Definition: gdb_signals.h:223
@ TARGET_SIGNAL_STOP
Definition: gdb_signals.h:75
@ TARGET_SIGNAL_SOUND
Definition: gdb_signals.h:101
@ TARGET_SIGNAL_INFO
Definition: gdb_signals.h:211
@ TARGET_SIGNAL_REALTIME_127
Definition: gdb_signals.h:209
@ TARGET_SIGNAL_UNKNOWN
Definition: gdb_signals.h:214
@ TARGET_SIGNAL_IO
Definition: gdb_signals.h:81
@ TARGET_SIGNAL_SYS
Definition: gdb_signals.h:70
@ TARGET_SIGNAL_TSTP
Definition: gdb_signals.h:76
@ TARGET_SIGNAL_WIND
Definition: gdb_signals.h:93
@ TARGET_SIGNAL_PIPE
Definition: gdb_signals.h:71
@ TARGET_SIGNAL_CANCEL
Definition: gdb_signals.h:137
@ TARGET_SIGNAL_PROF
Definition: gdb_signals.h:85
@ TARGET_SIGNAL_REALTIME_32
Definition: gdb_signals.h:143
static int
Definition: sfsocketcall.h:114
#define NTO_SIGPWR
Definition: sigutil.c:30
#define NTO_SIGILL
Definition: sigutil.c:13
#define NTO_SIGRTMAX
Definition: sigutil.c:45
enum target_signal target_signal_from_host(int hostsig)
Definition: sigutil.c:89
#define NTO_SIGTTOU
Definition: sigutil.c:39
static struct @604 sig_map[]
#define NTO_SIGPIPE
Definition: sigutil.c:24
#define NTO_SIGSYS
Definition: sigutil.c:23
#define NTO_SIGINT
Definition: sigutil.c:11
int nto_sig
Definition: sigutil.c:51
#define NTO_SIGHUP
Definition: sigutil.c:10
#define NTO_SIGUSR1
Definition: sigutil.c:27
#define NTO_SIGXCPU
Definition: sigutil.c:42
#define NTO_SIGALRM
Definition: sigutil.c:25
#define NTO_SIGWINCH
Definition: sigutil.c:31
#define NTO_SIGPROF
Definition: sigutil.c:41
enum target_signal gdb_sig
Definition: sigutil.c:52
#define NTO_SIGPOLL
Definition: sigutil.c:33
#define NTO_SIGTRAP
Definition: sigutil.c:14
#define NTO_SIGTERM
Definition: sigutil.c:26
#define NTO_SIGABRT
Definition: sigutil.c:16
#define NTO_SIGFPE
Definition: sigutil.c:19
#define NTO_SIGEMT
Definition: sigutil.c:17
#define NTO_SIGTSTP
Definition: sigutil.c:36
#define NTO_SIGBUS
Definition: sigutil.c:21
#define NTO_SIGTTIN
Definition: sigutil.c:38
#define NTO_SIGKILL
Definition: sigutil.c:20
#define NTO_SIGUSR2
Definition: sigutil.c:28
#define NTO_SIGSEGV
Definition: sigutil.c:22
#define NTO_SIGCHLD
Definition: sigutil.c:29
static int do_target_signal_to_host(enum target_signal oursig, int *oursig_ok)
Definition: sigutil.c:330
#define NTO_SIGSTOP
Definition: sigutil.c:35
#define NTO_SIGVTALRM
Definition: sigutil.c:40
#define NTO_SIGRTMIN
Definition: sigutil.c:44
#define NTO_SIGQUIT
Definition: sigutil.c:12
int host_signal_from_nto(int sig)
Definition: sigutil.c:611
enum target_signal target_signal_from_nto(int sig)
Definition: sigutil.c:596
#define NTO_SIGURG
Definition: sigutil.c:32
#define NTO_SIGXFSZ
Definition: sigutil.c:43
int target_signal_to_host(enum target_signal oursig)
Definition: sigutil.c:585
#define NTO_SIGCONT
Definition: sigutil.c:37
void error(const char *msg)
Definition: untgz.c:593
#define SIGHUP
Definition: win.h:86
#define SIGWINCH
Definition: win.h:88