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.
This commit is contained in:
Mike Frysinger
2014-02-20 00:28:17 -05:00
parent 61d1ce24e8
commit 60d847df0b
32 changed files with 100 additions and 29 deletions

View File

@@ -273,7 +273,7 @@ void sim_stop_reason (SIM_DESC sd, enum sim_stop *reason, int *sigrc);
Simulators should be prepared to deal with any combination of NULL
or empty CMD. */
void sim_do_command (SIM_DESC sd, char *cmd);
void sim_do_command (SIM_DESC sd, const char *cmd);
/* Complete a command based on the available sim commands. Returns an
array of possible matches. */