constify target fields
authorTom Tromey <tromey@redhat.com>
Tue, 22 Jul 2014 02:57:15 +0000 (20:57 -0600)
committerTom Tromey <tromey@redhat.com>
Thu, 24 Jul 2014 17:30:04 +0000 (11:30 -0600)
This constifies the target_ops fields to_shortname, to_longname, and
to_doc.

2014-07-24  Tom Tromey  <tromey@redhat.com>

* monitor.c (compile_pattern): Update.
* target.h (struct target_ops) <to_shortname, to_longname,
to_doc>: Now const.

gdb/ChangeLog
gdb/monitor.c
gdb/target.h

index e35d49b4851e58d081d3645c46758bf1e881efdf..b0c79b5653b774cd23b411daf189d98d91606738 100644 (file)
@@ -1,3 +1,9 @@
+2014-07-24  Tom Tromey  <tromey@redhat.com>
+
+       * monitor.c (compile_pattern): Update.
+       * target.h (struct target_ops) <to_shortname, to_longname,
+       to_doc>: Now const.
+
 2014-07-24  Tom Tromey  <tromey@redhat.com>
 
        * cli/cli-decode.c (add_cmd, add_prefix_cmd)
index 788bca0b3b6fcba7695e1281f24a6d365ebe7946..6767197ac61e81df70505f69fee189b1b54ab165 100644 (file)
@@ -715,7 +715,7 @@ compile_pattern (char *pattern, struct re_pattern_buffer *compiled_pattern,
 void
 monitor_open (const char *args, struct monitor_ops *mon_ops, int from_tty)
 {
-  char *name;
+  const char *name;
   char **p;
   struct inferior *inf;
 
index e4aade77e54ebe1fc8a97453d91a0c36abc30606..bcf97d9ab4797209d1475456734ed49653ddab2f 100644 (file)
@@ -394,9 +394,9 @@ typedef void async_callback_ftype (enum inferior_event_type event_type,
 struct target_ops
   {
     struct target_ops *beneath;        /* To the target under this one.  */
-    char *to_shortname;                /* Name this target type */
-    char *to_longname;         /* Name for printing */
-    char *to_doc;              /* Documentation.  Does not include trailing
+    const char *to_shortname;  /* Name this target type */
+    const char *to_longname;   /* Name for printing */
+    const char *to_doc;                /* Documentation.  Does not include trailing
                                   newline, and starts with a one-line descrip-
                                   tion (probably similar to to_longname).  */
     /* Per-target scratch pad.  */
This page took 0.030397 seconds and 4 git commands to generate.