diff options
author | Doug Evans <dje@google.com> | 2009-01-15 22:07:20 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2009-01-15 22:07:20 +0000 |
commit | 5436304513349c5447b61f8b5ed6c38d77c5f0d9 (patch) | |
tree | 23b32c6ae038923f720173289f7804d7386b1c30 /gdb/signals | |
parent | 99e9a495d54f59d91ec80973182c8832509274ee (diff) | |
download | gdb-5436304513349c5447b61f8b5ed6c38d77c5f0d9.zip gdb-5436304513349c5447b61f8b5ed6c38d77c5f0d9.tar.gz gdb-5436304513349c5447b61f8b5ed6c38d77c5f0d9.tar.bz2 |
* target.h (target_signal_to_string): Make return type const char *.
(target_signal_to_name): Ditto.
(target_signal_from_name): Make arg const char *.
* thread-db.c (thread_db_err_str): Make return type const char *.
* utils.c (perror_with_name): Make arg const char *.
* infrun.c (sig_print_info): Update.
* signals/signals.c (signals): Make array and struct members const.
(target_signal_to_string): Make return type const char *.
(target_signal_to_name): Ditto.
(target_signal_from_name): Make arg const char *.
* gdbserver/gdbreplay.c (perror_with_name): Make arg const char *.
* gdbserver/server.h (target_signal_to_name): Make return type
const char *.
Diffstat (limited to 'gdb/signals')
-rw-r--r-- | gdb/signals/signals.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/signals/signals.c b/gdb/signals/signals.c index 034e1c6..af1b92e 100644 --- a/gdb/signals/signals.c +++ b/gdb/signals/signals.c @@ -50,9 +50,9 @@ struct gdbarch; /* This table must match in order and size the signals in enum target_signal in src/include/gdb/signals.h. */ /* *INDENT-OFF* */ -static struct { - char *name; - char *string; +static const struct { + const char *name; + const char *string; } signals [] = { {"0", "Signal 0"}, @@ -219,7 +219,7 @@ static struct { /* Return the string for a signal. */ -char * +const char * target_signal_to_string (enum target_signal sig) { if ((int) sig >= TARGET_SIGNAL_FIRST && (int) sig <= TARGET_SIGNAL_LAST) @@ -229,7 +229,7 @@ target_signal_to_string (enum target_signal sig) } /* Return the name for a signal. */ -char * +const char * target_signal_to_name (enum target_signal sig) { if ((int) sig >= TARGET_SIGNAL_FIRST && (int) sig <= TARGET_SIGNAL_LAST @@ -243,7 +243,7 @@ target_signal_to_name (enum target_signal sig) /* Given a name, return its signal. */ enum target_signal -target_signal_from_name (char *name) +target_signal_from_name (const char *name) { enum target_signal sig; |