mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-18 16:53:50 +08:00
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.
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
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>
|
2014-06-16 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
* breakpoint.c (insert_bp_location, remove_breakpoint_1): Adjust.
|
* breakpoint.c (insert_bp_location, remove_breakpoint_1): Adjust.
|
||||||
|
@ -2282,7 +2282,7 @@ monitor_stop (struct target_ops *self, ptid_t ptid)
|
|||||||
ourseleves here cause of a nasty echo. */
|
ourseleves here cause of a nasty echo. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
monitor_rcmd (struct target_ops *self, char *command,
|
monitor_rcmd (struct target_ops *self, const char *command,
|
||||||
struct ui_file *outbuf)
|
struct ui_file *outbuf)
|
||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
|
@ -8988,7 +8988,7 @@ remote_search_memory (struct target_ops* ops,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
remote_rcmd (struct target_ops *self, char *command,
|
remote_rcmd (struct target_ops *self, const char *command,
|
||||||
struct ui_file *outbuf)
|
struct ui_file *outbuf)
|
||||||
{
|
{
|
||||||
struct remote_state *rs = get_remote_state ();
|
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);
|
error (_("\"monitor\" command ``%s'' is too long."), command);
|
||||||
|
|
||||||
/* Encode the actual 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)
|
if (putpkt (rs->buf) < 0)
|
||||||
error (_("Communication problem with target."));
|
error (_("Communication problem with target."));
|
||||||
|
@ -631,7 +631,7 @@ tdefault_stop (struct target_ops *self, ptid_t arg1)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
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 = self->beneath;
|
||||||
self->to_rcmd (self, arg1, arg2);
|
self->to_rcmd (self, arg1, arg2);
|
||||||
|
@ -57,7 +57,7 @@ static int default_watchpoint_addr_within_range (struct target_ops *,
|
|||||||
static int default_region_ok_for_hw_watchpoint (struct target_ops *,
|
static int default_region_ok_for_hw_watchpoint (struct target_ops *,
|
||||||
CORE_ADDR, int);
|
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,
|
static ptid_t default_get_ada_task_ptid (struct target_ops *self,
|
||||||
long lwp, long tid);
|
long lwp, long tid);
|
||||||
@ -4006,7 +4006,7 @@ debug_to_stop (struct target_ops *self, ptid_t ptid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
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)
|
struct ui_file *outbuf)
|
||||||
{
|
{
|
||||||
debug_target.to_rcmd (&debug_target, command, outbuf);
|
debug_target.to_rcmd (&debug_target, command, outbuf);
|
||||||
@ -4080,7 +4080,8 @@ stack of targets currently in use (including the exec-file,\n\
|
|||||||
core-file, and process, if any), as well as the symbol file name.";
|
core-file, and process, if any), as well as the symbol file name.";
|
||||||
|
|
||||||
static void
|
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."));
|
error (_("\"monitor\" command not supported by this target."));
|
||||||
}
|
}
|
||||||
|
@ -560,7 +560,7 @@ struct target_ops
|
|||||||
void (*to_stop) (struct target_ops *, ptid_t)
|
void (*to_stop) (struct target_ops *, ptid_t)
|
||||||
TARGET_DEFAULT_IGNORE ();
|
TARGET_DEFAULT_IGNORE ();
|
||||||
void (*to_rcmd) (struct target_ops *,
|
void (*to_rcmd) (struct target_ops *,
|
||||||
char *command, struct ui_file *output)
|
const char *command, struct ui_file *output)
|
||||||
TARGET_DEFAULT_FUNC (default_rcmd);
|
TARGET_DEFAULT_FUNC (default_rcmd);
|
||||||
char *(*to_pid_to_exec_file) (struct target_ops *, int pid)
|
char *(*to_pid_to_exec_file) (struct target_ops *, int pid)
|
||||||
TARGET_DEFAULT_RETURN (NULL);
|
TARGET_DEFAULT_RETURN (NULL);
|
||||||
|
Reference in New Issue
Block a user