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.
+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.
+
2014-06-16 Pedro Alves <palves@redhat.com>
* breakpoint.c (insert_bp_location, remove_breakpoint_1): Adjust.
ourseleves here cause of a nasty echo. */
static void
-monitor_rcmd (struct target_ops *self, char *command,
+monitor_rcmd (struct target_ops *self, const char *command,
struct ui_file *outbuf)
{
char *p;
}
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 ();
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."));
}
static void
-delegate_rcmd (struct target_ops *self, char *arg1, struct ui_file *arg2)
+delegate_rcmd (struct target_ops *self, const char *arg1, struct ui_file *arg2)
{
self = self->beneath;
self->to_rcmd (self, arg1, arg2);
static int default_region_ok_for_hw_watchpoint (struct target_ops *,
CORE_ADDR, int);
-static void default_rcmd (struct target_ops *, char *, struct ui_file *);
+static void default_rcmd (struct target_ops *, const char *, struct ui_file *);
static ptid_t default_get_ada_task_ptid (struct target_ops *self,
long lwp, long tid);
}
static void
-debug_to_rcmd (struct target_ops *self, char *command,
+debug_to_rcmd (struct target_ops *self, const char *command,
struct ui_file *outbuf)
{
debug_target.to_rcmd (&debug_target, command, outbuf);
core-file, and process, if any), as well as the symbol file name.";
static void
-default_rcmd (struct target_ops *self, char *command, struct ui_file *output)
+default_rcmd (struct target_ops *self, const char *command,
+ struct ui_file *output)
{
error (_("\"monitor\" command not supported by this target."));
}
void (*to_stop) (struct target_ops *, ptid_t)
TARGET_DEFAULT_IGNORE ();
void (*to_rcmd) (struct target_ops *,
- char *command, struct ui_file *output)
+ const char *command, struct ui_file *output)
TARGET_DEFAULT_FUNC (default_rcmd);
char *(*to_pid_to_exec_file) (struct target_ops *, int pid)
TARGET_DEFAULT_RETURN (NULL);