From 60d847df0b9691b7cb38bfba41b9d6aafd97efc2 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 20 Feb 2014 00:28:17 -0500 Subject: 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. --- include/gdb/ChangeLog | 4 ++++ include/gdb/remote-sim.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/gdb/ChangeLog b/include/gdb/ChangeLog index f6d4932..135391d 100644 --- a/include/gdb/ChangeLog +++ b/include/gdb/ChangeLog @@ -1,3 +1,7 @@ +2014-03-10 Mike Frysinger + + * remote-sim.h (sim_do_command): Add const to cmd. + 2014-03-05 Alan Modra Update copyright notice. diff --git a/include/gdb/remote-sim.h b/include/gdb/remote-sim.h index 03f87f5..c335d4f 100644 --- a/include/gdb/remote-sim.h +++ b/include/gdb/remote-sim.h @@ -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. */ -- cgit v1.1