aboutsummaryrefslogtreecommitdiff
path: root/gdb/common
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2012-05-24 16:39:15 +0000
committerPedro Alves <palves@redhat.com>2012-05-24 16:39:15 +0000
commit2ea286498fd2ddceaf074bfbc9a2986777ea0396 (patch)
tree4360c24b1ef43fad4fa8143e65435c33f053617c /gdb/common
parentb09846a918b74f0371149f730f8b391548b11a8d (diff)
downloadgdb-2ea286498fd2ddceaf074bfbc9a2986777ea0396.zip
gdb-2ea286498fd2ddceaf074bfbc9a2986777ea0396.tar.gz
gdb-2ea286498fd2ddceaf074bfbc9a2986777ea0396.tar.bz2
gdb/
2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace target_signal with gdb_signal throughout. gdb/gdbserver/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace target_signal with gdb_signal throughout. include/gdb/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace target_signal with gdb_signal throughout. sim/common/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace target_signal with gdb_signal throughout.
Diffstat (limited to 'gdb/common')
-rw-r--r--gdb/common/gdb_signals.h24
-rw-r--r--gdb/common/signals.c38
2 files changed, 31 insertions, 31 deletions
diff --git a/gdb/common/gdb_signals.h b/gdb/common/gdb_signals.h
index 1cc6297..3929155 100644
--- a/gdb/common/gdb_signals.h
+++ b/gdb/common/gdb_signals.h
@@ -22,33 +22,33 @@
#include "gdb/signals.h"
-/* Predicate to target_signal_to_host(). Return non-zero if the enum
+/* Predicate to gdb_signal_to_host(). Return non-zero if the enum
targ_signal SIGNO has an equivalent ``host'' representation. */
/* FIXME: cagney/1999-11-22: The name below was chosen in preference
- to the shorter target_signal_p() because it is far less ambigious.
- In this context ``target_signal'' refers to GDB's internal
+ to the shorter gdb_signal_p() because it is far less ambigious.
+ In this context ``gdb_signal'' refers to GDB's internal
representation of the target's set of signals while ``host signal''
refers to the target operating system's signal. Confused? */
-extern int target_signal_to_host_p (enum target_signal signo);
+extern int gdb_signal_to_host_p (enum gdb_signal signo);
-/* Convert between host signal numbers and enum target_signal's.
- target_signal_to_host() returns 0 and prints a warning() on GDB's
+/* Convert between host signal numbers and enum gdb_signal's.
+ gdb_signal_to_host() returns 0 and prints a warning() on GDB's
console if SIGNO has no equivalent host representation. */
/* FIXME: cagney/1999-11-22: Here ``host'' is used incorrectly, it is
refering to the target operating system's signal numbering.
- Similarly, ``enum target_signal'' is named incorrectly, ``enum
+ Similarly, ``enum gdb_signal'' is named incorrectly, ``enum
gdb_signal'' would probably be better as it is refering to GDB's
internal representation of a target operating system's signal. */
-extern enum target_signal target_signal_from_host (int);
-extern int target_signal_to_host (enum target_signal);
+extern enum gdb_signal gdb_signal_from_host (int);
+extern int gdb_signal_to_host (enum gdb_signal);
/* Return the string for a signal. */
-extern const char *target_signal_to_string (enum target_signal);
+extern const char *gdb_signal_to_string (enum gdb_signal);
/* Return the name (SIGHUP, etc.) for a signal. */
-extern const char *target_signal_to_name (enum target_signal);
+extern const char *gdb_signal_to_name (enum gdb_signal);
/* Given a name (SIGHUP, etc.), return its signal. */
-enum target_signal target_signal_from_name (const char *);
+enum gdb_signal gdb_signal_from_name (const char *);
#endif /* COMMON_GDB_SIGNALS_H */
diff --git a/gdb/common/signals.c b/gdb/common/signals.c
index 2e82e9c..46ae576 100644
--- a/gdb/common/signals.c
+++ b/gdb/common/signals.c
@@ -47,7 +47,7 @@ struct gdbarch;
#endif
/* This table must match in order and size the signals in enum
- target_signal. */
+ gdb_signal. */
static const struct {
const char *name;
@@ -62,7 +62,7 @@ static const struct {
/* Return the string for a signal. */
const char *
-target_signal_to_string (enum target_signal sig)
+gdb_signal_to_string (enum gdb_signal sig)
{
if ((int) sig >= TARGET_SIGNAL_FIRST && (int) sig <= TARGET_SIGNAL_LAST)
return signals[sig].string;
@@ -72,7 +72,7 @@ target_signal_to_string (enum target_signal sig)
/* Return the name for a signal. */
const char *
-target_signal_to_name (enum target_signal sig)
+gdb_signal_to_name (enum gdb_signal sig)
{
if ((int) sig >= TARGET_SIGNAL_FIRST && (int) sig <= TARGET_SIGNAL_LAST
&& signals[sig].name != NULL)
@@ -84,10 +84,10 @@ target_signal_to_name (enum target_signal sig)
}
/* Given a name, return its signal. */
-enum target_signal
-target_signal_from_name (const char *name)
+enum gdb_signal
+gdb_signal_from_name (const char *name)
{
- enum target_signal sig;
+ enum gdb_signal sig;
/* It's possible we also should allow "SIGCLD" as well as "SIGCHLD"
for TARGET_SIGNAL_SIGCHLD. SIGIOT, on the other hand, is more
@@ -97,7 +97,7 @@ target_signal_from_name (const char *name)
/* This ugly cast brought to you by the native VAX compiler. */
for (sig = TARGET_SIGNAL_HUP;
sig < TARGET_SIGNAL_LAST;
- sig = (enum target_signal) ((int) sig + 1))
+ sig = (enum gdb_signal) ((int) sig + 1))
if (signals[sig].name != NULL
&& strcmp (name, signals[sig].name) == 0)
return sig;
@@ -109,8 +109,8 @@ target_signal_from_name (const char *name)
a file called native-utils.c or unixwaitstatus-utils.c or whatever. */
/* Convert host signal to our signals. */
-enum target_signal
-target_signal_from_host (int hostsig)
+enum gdb_signal
+gdb_signal_from_host (int hostsig)
{
/* A switch statement would make sense but would require special kludges
to deal with the cases where more than one signal has the same number. */
@@ -339,15 +339,15 @@ target_signal_from_host (int hostsig)
{
/* This block of TARGET_SIGNAL_REALTIME value is in order. */
if (33 <= hostsig && hostsig <= 63)
- return (enum target_signal)
+ return (enum gdb_signal)
(hostsig - 33 + (int) TARGET_SIGNAL_REALTIME_33);
else if (hostsig == 32)
return TARGET_SIGNAL_REALTIME_32;
else if (64 <= hostsig && hostsig <= 127)
- return (enum target_signal)
+ return (enum gdb_signal)
(hostsig - 64 + (int) TARGET_SIGNAL_REALTIME_64);
else
- error (_("GDB bug: target.c (target_signal_from_host): "
+ error (_("GDB bug: target.c (gdb_signal_from_host): "
"unrecognized real-time signal"));
}
#endif
@@ -355,13 +355,13 @@ target_signal_from_host (int hostsig)
return TARGET_SIGNAL_UNKNOWN;
}
-/* Convert a OURSIG (an enum target_signal) to the form used by the
+/* Convert a OURSIG (an enum gdb_signal) to the form used by the
target operating system (refered to as the ``host'') or zero if the
equivalent host signal is not available. Set/clear OURSIG_OK
accordingly. */
static int
-do_target_signal_to_host (enum target_signal oursig,
+do_gdb_signal_to_host (enum gdb_signal oursig,
int *oursig_ok)
{
int retsig;
@@ -626,24 +626,24 @@ do_target_signal_to_host (enum target_signal oursig,
}
int
-target_signal_to_host_p (enum target_signal oursig)
+gdb_signal_to_host_p (enum gdb_signal oursig)
{
int oursig_ok;
- do_target_signal_to_host (oursig, &oursig_ok);
+ do_gdb_signal_to_host (oursig, &oursig_ok);
return oursig_ok;
}
int
-target_signal_to_host (enum target_signal oursig)
+gdb_signal_to_host (enum gdb_signal oursig)
{
int oursig_ok;
- int targ_signo = do_target_signal_to_host (oursig, &oursig_ok);
+ int targ_signo = do_gdb_signal_to_host (oursig, &oursig_ok);
if (!oursig_ok)
{
/* The user might be trying to do "signal SIGSAK" where this system
doesn't have SIGSAK. */
warning (_("Signal %s does not exist on this system."),
- target_signal_to_name (oursig));
+ gdb_signal_to_name (oursig));
return 0;
}
else