From 5436304513349c5447b61f8b5ed6c38d77c5f0d9 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Thu, 15 Jan 2009 22:07:20 +0000 Subject: * 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 *. --- gdb/signals/signals.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gdb/signals/signals.c') 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; -- cgit v1.1