+2014-06-16 Tom Tromey <tromey@redhat.com>
+
+ * target.h (struct target_ops) <to_disconnect>: Make parameter
+ const.
+ (target_disconnect): Update.
+ * target.c (target_disconnect): Make "args" const.
+ * target-delegates.c: Rebuild.
+ * remote.c (remote_disconnect): Update.
+ * record.h (record_disconnect): Update.
+ * record.c (record_disconnect): Update.
+ * inf-child.c (inf_child_disconnect): Update.
+
2014-06-16 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_rcmd>: Make "command" const.
/* Implement the to_disconnect target_ops method. */
static void
-inf_child_disconnect (struct target_ops *target, char *args, int from_tty)
+inf_child_disconnect (struct target_ops *target, const char *args, int from_tty)
{
if (args != NULL)
error (_("Argument given to \"disconnect\"."));
/* See record.h. */
void
-record_disconnect (struct target_ops *t, char *args, int from_tty)
+record_disconnect (struct target_ops *t, const char *args, int from_tty)
{
gdb_assert (t->to_stratum == record_stratum);
extern void cmd_record_goto (char *arg, int from_tty);
/* The default "to_disconnect" target method for record targets. */
-extern void record_disconnect (struct target_ops *, char *, int);
+extern void record_disconnect (struct target_ops *, const char *, int);
/* The default "to_detach" target method for record targets. */
extern void record_detach (struct target_ops *, const char *, int);
/* Same as remote_detach, but don't send the "D" packet; just disconnect. */
static void
-remote_disconnect (struct target_ops *target, char *args, int from_tty)
+remote_disconnect (struct target_ops *target, const char *args, int from_tty)
{
if (args)
error (_("Argument given to \"disconnect\" when remotely debugging."));
}
static void
-delegate_disconnect (struct target_ops *self, char *arg1, int arg2)
+delegate_disconnect (struct target_ops *self, const char *arg1, int arg2)
{
self = self->beneath;
self->to_disconnect (self, arg1, arg2);
}
static void
-tdefault_disconnect (struct target_ops *self, char *arg1, int arg2)
+tdefault_disconnect (struct target_ops *self, const char *arg1, int arg2)
{
tcomplain ();
}
}
void
-target_disconnect (char *args, int from_tty)
+target_disconnect (const char *args, int from_tty)
{
/* If we're in breakpoints-always-inserted mode or if breakpoints
are global across processes, we have to remove them before
TARGET_DEFAULT_IGNORE ();
void (*to_detach) (struct target_ops *ops, const char *, int)
TARGET_DEFAULT_IGNORE ();
- void (*to_disconnect) (struct target_ops *, char *, int)
+ void (*to_disconnect) (struct target_ops *, const char *, int)
TARGET_DEFAULT_NORETURN (tcomplain ());
void (*to_resume) (struct target_ops *, ptid_t, int, enum gdb_signal)
TARGET_DEFAULT_NORETURN (noprocess ());
/* Disconnect from the current target without resuming it (leaving it
waiting for a debugger). */
-extern void target_disconnect (char *, int);
+extern void target_disconnect (const char *, int);
/* Resume execution of the target process PTID (or a group of
threads). STEP says whether to single-step or to run free; SIGGNAL