constify to_disconnect
authorTom Tromey <tromey@redhat.com>
Fri, 6 Jun 2014 19:26:53 +0000 (13:26 -0600)
committerTom Tromey <tromey@redhat.com>
Mon, 16 Jun 2014 16:29:17 +0000 (10:29 -0600)
This constifies an parameter of to_disconnect and updates
target_disconnect as well.

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.

gdb/ChangeLog
gdb/inf-child.c
gdb/record.c
gdb/record.h
gdb/remote.c
gdb/target-delegates.c
gdb/target.c
gdb/target.h

index 6ed744752d5943f9039b2359c3ae206fe33e0145..44a05d30eaa15cd127949701e3dbcef70f19403f 100644 (file)
@@ -1,3 +1,15 @@
+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.
index dbadde845d8527cb66433858e3c80f5b8a63cbf3..897e63597243b46b97d2a68ebdd1e2b3124acc97 100644 (file)
@@ -140,7 +140,7 @@ inf_child_open (char *arg, int from_tty)
 /* 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\"."));
index 5a7a88c347504f718e21f08dcbba217c273a5198..b801b7fc340344ace8d67ad27fe565ba5b53c0a5 100644 (file)
@@ -130,7 +130,7 @@ record_unpush (struct target_ops *t)
 /* 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);
 
index f5987e344a2165719a3b0c691968fc53cd0b2c12..29784ad1ac909d3d6646109a019f879a82d61bba 100644 (file)
@@ -57,7 +57,7 @@ extern int record_read_memory (struct gdbarch *gdbarch,
 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);
index 12a79972a32671e177eba46de9a9969445f37266..909e9dd8beda33f6ed876ad6a514efe478a867be 100644 (file)
@@ -4347,7 +4347,7 @@ extended_remote_detach (struct target_ops *ops, const char *args, int from_tty)
 /* 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."));
index 522d52be4848ed93b58099ac04b10bf5eb3e5e42..4eefae8d9b13c6c1be4f33d9c2e63f2f771897cf 100644 (file)
@@ -28,14 +28,14 @@ tdefault_detach (struct target_ops *self, const char *arg1, int arg2)
 }
 
 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 ();
 }
index a9255d7caf3a7dde2c27e0c739ebf829105f31fe..f3226b95ada51c0cec38b50c1c8c99c3bfd82a19 100644 (file)
@@ -2087,7 +2087,7 @@ target_detach (const char *args, int from_tty)
 }
 
 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
index 87d2a83027e379a13303024f915869530a2e0935..7f9714e9156387cf5e9089889c45d7794ad50533 100644 (file)
@@ -414,7 +414,7 @@ struct target_ops
       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 ());
@@ -1177,7 +1177,7 @@ extern void target_detach (const char *, int);
 /* 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
This page took 0.036918 seconds and 4 git commands to generate.