aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2014-06-06 13:19:53 -0600
committerTom Tromey <tromey@redhat.com>2014-06-16 10:29:17 -0600
commita30bf1f15c51b82a0134713bc44175cda296d3ae (patch)
tree9e741116883ba6d993d4329fe7269ac724f0b313 /gdb/remote.c
parentf4c51f600ed2fcf9f29bdaae71aa767b9b1bc4ac (diff)
downloadgdb-a30bf1f15c51b82a0134713bc44175cda296d3ae.zip
gdb-a30bf1f15c51b82a0134713bc44175cda296d3ae.tar.gz
gdb-a30bf1f15c51b82a0134713bc44175cda296d3ae.tar.bz2
constify to_rcmd
This makes the "command" parameter of the to_rcmd target method const. 2014-06-16 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_rcmd>: Make "command" const. * target.c (debug_to_rcmd, default_rcmd): Update. * target-delegates.c: Rebuild. * remote.c (remote_rcmd): Update. * monitor.c (monitor_rcmd): Update.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index 9db3410..12a7997 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -8988,7 +8988,7 @@ remote_search_memory (struct target_ops* ops,
}
static void
-remote_rcmd (struct target_ops *self, char *command,
+remote_rcmd (struct target_ops *self, const char *command,
struct ui_file *outbuf)
{
struct remote_state *rs = get_remote_state ();
@@ -9010,7 +9010,7 @@ remote_rcmd (struct target_ops *self, char *command,
error (_("\"monitor\" command ``%s'' is too long."), command);
/* Encode the actual command. */
- bin2hex ((gdb_byte *) command, p, strlen (command));
+ bin2hex ((const gdb_byte *) command, p, strlen (command));
if (putpkt (rs->buf) < 0)
error (_("Communication problem with target."));