OLD | NEW |
1 /* Target signal translation functions for GDB. | 1 /* Target signal translation functions for GDB. |
2 Copyright (C) 1990-2003, 2006-2012 Free Software Foundation, Inc. | 2 Copyright (C) 1990-2003, 2006-2012 Free Software Foundation, Inc. |
3 Contributed by Cygnus Support. | 3 Contributed by Cygnus Support. |
4 | 4 |
5 This file is part of GDB. | 5 This file is part of GDB. |
6 | 6 |
7 This program is free software; you can redistribute it and/or modify | 7 This program is free software; you can redistribute it and/or modify |
8 it under the terms of the GNU General Public License as published by | 8 it under the terms of the GNU General Public License as published by |
9 the Free Software Foundation; either version 3 of the License, or | 9 the Free Software Foundation; either version 3 of the License, or |
10 (at your option) any later version. | 10 (at your option) any later version. |
(...skipping 29 matching lines...) Expand all Loading... |
40 # if defined(__SIGRTMIN) | 40 # if defined(__SIGRTMIN) |
41 # define REALTIME_LO __SIGRTMIN | 41 # define REALTIME_LO __SIGRTMIN |
42 # define REALTIME_HI (__SIGRTMAX + 1) | 42 # define REALTIME_HI (__SIGRTMAX + 1) |
43 # elif defined(SIGRTMIN) | 43 # elif defined(SIGRTMIN) |
44 # define REALTIME_LO SIGRTMIN | 44 # define REALTIME_LO SIGRTMIN |
45 # define REALTIME_HI (SIGRTMAX + 1) | 45 # define REALTIME_HI (SIGRTMAX + 1) |
46 # endif | 46 # endif |
47 #endif | 47 #endif |
48 | 48 |
49 /* This table must match in order and size the signals in enum | 49 /* This table must match in order and size the signals in enum |
50 target_signal. */ | 50 gdb_signal. */ |
51 | 51 |
52 static const struct { | 52 static const struct { |
53 const char *name; | 53 const char *name; |
54 const char *string; | 54 const char *string; |
55 } signals [] = | 55 } signals [] = |
56 { | 56 { |
57 #define SET(symbol, constant, name, string) { name, string }, | 57 #define SET(symbol, constant, name, string) { name, string }, |
58 #include "gdb/signals.def" | 58 #include "gdb/signals.def" |
59 #undef SET | 59 #undef SET |
60 }; | 60 }; |
61 | 61 |
62 | 62 |
63 /* Return the string for a signal. */ | 63 /* Return the string for a signal. */ |
64 const char * | 64 const char * |
65 target_signal_to_string (enum target_signal sig) | 65 gdb_signal_to_string (enum gdb_signal sig) |
66 { | 66 { |
67 if ((int) sig >= TARGET_SIGNAL_FIRST && (int) sig <= TARGET_SIGNAL_LAST) | 67 if ((int) sig >= GDB_SIGNAL_FIRST && (int) sig <= GDB_SIGNAL_LAST) |
68 return signals[sig].string; | 68 return signals[sig].string; |
69 else | 69 else |
70 return signals[TARGET_SIGNAL_UNKNOWN].string; | 70 return signals[GDB_SIGNAL_UNKNOWN].string; |
71 } | 71 } |
72 | 72 |
73 /* Return the name for a signal. */ | 73 /* Return the name for a signal. */ |
74 const char * | 74 const char * |
75 target_signal_to_name (enum target_signal sig) | 75 gdb_signal_to_name (enum gdb_signal sig) |
76 { | 76 { |
77 if ((int) sig >= TARGET_SIGNAL_FIRST && (int) sig <= TARGET_SIGNAL_LAST | 77 if ((int) sig >= GDB_SIGNAL_FIRST && (int) sig <= GDB_SIGNAL_LAST |
78 && signals[sig].name != NULL) | 78 && signals[sig].name != NULL) |
79 return signals[sig].name; | 79 return signals[sig].name; |
80 else | 80 else |
81 /* I think the code which prints this will always print it along | 81 /* I think the code which prints this will always print it along |
82 with the string, so no need to be verbose (very old comment). */ | 82 with the string, so no need to be verbose (very old comment). */ |
83 return "?"; | 83 return "?"; |
error: old chunk mismatch |
None
OLD | NEW |