gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / gdbsupport / gdb_signals.h
CommitLineData
2aecd87f 1/* Target signal translation functions for GDB.
b811d2c2 2 Copyright (C) 1990-2020 Free Software Foundation, Inc.
2aecd87f
DE
3 Contributed by Cygnus Support.
4
5 This file is part of GDB.
6
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
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
20#ifndef COMMON_GDB_SIGNALS_H
21#define COMMON_GDB_SIGNALS_H
22
23#include "gdb/signals.h"
24
2ea28649 25/* Predicate to gdb_signal_to_host(). Return non-zero if the enum
2aecd87f
DE
26 targ_signal SIGNO has an equivalent ``host'' representation. */
27/* FIXME: cagney/1999-11-22: The name below was chosen in preference
2ea28649
PA
28 to the shorter gdb_signal_p() because it is far less ambigious.
29 In this context ``gdb_signal'' refers to GDB's internal
2aecd87f
DE
30 representation of the target's set of signals while ``host signal''
31 refers to the target operating system's signal. Confused? */
2ea28649 32extern int gdb_signal_to_host_p (enum gdb_signal signo);
2aecd87f 33
2ea28649
PA
34/* Convert between host signal numbers and enum gdb_signal's.
35 gdb_signal_to_host() returns 0 and prints a warning() on GDB's
2aecd87f
DE
36 console if SIGNO has no equivalent host representation. */
37/* FIXME: cagney/1999-11-22: Here ``host'' is used incorrectly, it is
38 refering to the target operating system's signal numbering.
2ea28649 39 Similarly, ``enum gdb_signal'' is named incorrectly, ``enum
2aecd87f
DE
40 gdb_signal'' would probably be better as it is refering to GDB's
41 internal representation of a target operating system's signal. */
2ea28649
PA
42extern enum gdb_signal gdb_signal_from_host (int);
43extern int gdb_signal_to_host (enum gdb_signal);
2aecd87f 44
c9737c08
PA
45/* Return the enum symbol name of SIG as a string, to use in debug
46 output. */
47extern const char *gdb_signal_to_symbol_string (enum gdb_signal sig);
48
2aecd87f 49/* Return the string for a signal. */
2ea28649 50extern const char *gdb_signal_to_string (enum gdb_signal);
2aecd87f
DE
51
52/* Return the name (SIGHUP, etc.) for a signal. */
2ea28649 53extern const char *gdb_signal_to_name (enum gdb_signal);
2aecd87f
DE
54
55/* Given a name (SIGHUP, etc.), return its signal. */
2ea28649 56enum gdb_signal gdb_signal_from_name (const char *);
2aecd87f
DE
57
58#endif /* COMMON_GDB_SIGNALS_H */
This page took 0.768852 seconds and 4 git commands to generate.