GDB (API)
|
00001 /* Target signal translation functions for GDB. 00002 Copyright (C) 1990-2013 Free Software Foundation, Inc. 00003 Contributed by Cygnus Support. 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 3 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, see <http://www.gnu.org/licenses/>. */ 00019 00020 #ifndef COMMON_GDB_SIGNALS_H 00021 #define COMMON_GDB_SIGNALS_H 00022 00023 #include "gdb/signals.h" 00024 00025 /* Predicate to gdb_signal_to_host(). Return non-zero if the enum 00026 targ_signal SIGNO has an equivalent ``host'' representation. */ 00027 /* FIXME: cagney/1999-11-22: The name below was chosen in preference 00028 to the shorter gdb_signal_p() because it is far less ambigious. 00029 In this context ``gdb_signal'' refers to GDB's internal 00030 representation of the target's set of signals while ``host signal'' 00031 refers to the target operating system's signal. Confused? */ 00032 extern int gdb_signal_to_host_p (enum gdb_signal signo); 00033 00034 /* Convert between host signal numbers and enum gdb_signal's. 00035 gdb_signal_to_host() returns 0 and prints a warning() on GDB's 00036 console if SIGNO has no equivalent host representation. */ 00037 /* FIXME: cagney/1999-11-22: Here ``host'' is used incorrectly, it is 00038 refering to the target operating system's signal numbering. 00039 Similarly, ``enum gdb_signal'' is named incorrectly, ``enum 00040 gdb_signal'' would probably be better as it is refering to GDB's 00041 internal representation of a target operating system's signal. */ 00042 extern enum gdb_signal gdb_signal_from_host (int); 00043 extern int gdb_signal_to_host (enum gdb_signal); 00044 00045 /* Return the string for a signal. */ 00046 extern const char *gdb_signal_to_string (enum gdb_signal); 00047 00048 /* Return the name (SIGHUP, etc.) for a signal. */ 00049 extern const char *gdb_signal_to_name (enum gdb_signal); 00050 00051 /* Given a name (SIGHUP, etc.), return its signal. */ 00052 enum gdb_signal gdb_signal_from_name (const char *); 00053 00054 #endif /* COMMON_GDB_SIGNALS_H */