aboutsummaryrefslogtreecommitdiff
path: root/sim/sh/interp.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2014-02-20 00:28:17 -0500
committerMike Frysinger <vapier@gentoo.org>2014-03-10 22:57:29 -0400
commit60d847df0b9691b7cb38bfba41b9d6aafd97efc2 (patch)
treea2fa4e54d1c4bc8a82cdc5fbd65f5958875356cf /sim/sh/interp.c
parent61d1ce24e894c08a701efc5794012161ef101a60 (diff)
downloadgdb-60d847df0b9691b7cb38bfba41b9d6aafd97efc2.zip
gdb-60d847df0b9691b7cb38bfba41b9d6aafd97efc2.tar.gz
gdb-60d847df0b9691b7cb38bfba41b9d6aafd97efc2.tar.bz2
sim: constify arg to sim_do_command
It is rare for people to want to modify the cmd arg. In general, they really shouldn't be, but a few still do. For those who misbehave, dupe the string locally so they can bang on it.
Diffstat (limited to 'sim/sh/interp.c')
-rw-r--r--sim/sh/interp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sim/sh/interp.c b/sim/sh/interp.c
index cf6fd8d..c854174 100644
--- a/sim/sh/interp.c
+++ b/sim/sh/interp.c
@@ -473,7 +473,7 @@ int valid[16];
#define UNDEF(x)
#endif
-static void parse_and_set_memory_size (char *str);
+static void parse_and_set_memory_size (const char *str);
static int IOMEM (int addr, int write, int value);
static struct loop_bounds get_loop_bounds (int, int, unsigned char *,
unsigned char *, int, int);
@@ -2663,7 +2663,7 @@ sim_open (kind, cb, abfd, argv)
static void
parse_and_set_memory_size (str)
- char *str;
+ const char *str;
{
int n;
@@ -2739,9 +2739,9 @@ sim_create_inferior (sd, prog_bfd, argv, env)
void
sim_do_command (sd, cmd)
SIM_DESC sd;
- char *cmd;
+ const char *cmd;
{
- char *sms_cmd = "set-memory-size";
+ const char *sms_cmd = "set-memory-size";
int cmdsize;
if (cmd == NULL || *cmd == '\0')