* dwarf2read.c (dwarf2_add_field): Constify.
authorTom Tromey <tromey@redhat.com>
Wed, 18 May 2011 20:19:52 +0000 (20:19 +0000)
committerTom Tromey <tromey@redhat.com>
Wed, 18 May 2011 20:19:52 +0000 (20:19 +0000)
* value.c (value_static_field): Constify.
* gdbtypes.h (struct main_type) <field.field_location.physname>:
Now const.
* ax-gdb.c (gen_static_field): Constify

gdb/ChangeLog
gdb/ax-gdb.c
gdb/dwarf2read.c
gdb/gdbtypes.h
gdb/value.c

index 27c9271052a6ea9adfd016d341296d4567988e42..3103398d5a5957ed7b068bbdaa4dfbf2583b2089 100644 (file)
@@ -1,3 +1,11 @@
+2011-05-18  Tom Tromey  <tromey@redhat.com>
+
+       * dwarf2read.c (dwarf2_add_field): Constify.
+       * value.c (value_static_field): Constify.
+       * gdbtypes.h (struct main_type) <field.field_location.physname>:
+       Now const.
+       * ax-gdb.c (gen_static_field): Constify
+
 2011-05-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        * linux-nat.c (kill_callback): Use SIGKILL first.
index d1736e144ccfa723070cf678ae1746c905cd73c0..19c00ade5a36d0a171ca1f354993d549801a55e0 100644 (file)
@@ -1549,7 +1549,7 @@ gen_static_field (struct gdbarch *gdbarch,
     }
   else
     {
-      char *phys_name = TYPE_FIELD_STATIC_PHYSNAME (type, fieldno);
+      const char *phys_name = TYPE_FIELD_STATIC_PHYSNAME (type, fieldno);
       struct symbol *sym = lookup_symbol (phys_name, 0, VAR_DOMAIN, 0);
 
       if (sym)
index 562361eab1d67d68154b50c5d17a212d935cf8a2..658205e45b0dedc81e96c96f3e64df5b646e64aa 100644 (file)
@@ -6542,7 +6542,7 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die,
         (so through at least 3.2.1) incorrectly generate
         DW_TAG_variable tags.  */
 
-      char *physname;
+      const char *physname;
 
       /* Get name of field.  */
       fieldname = dwarf2_name (die, cu);
@@ -6563,7 +6563,7 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die,
        }
 
       /* Get physical name.  */
-      physname = (char *) dwarf2_physname (fieldname, die, cu);
+      physname = dwarf2_physname (fieldname, die, cu);
 
       /* The name is already allocated along with this objfile, so we don't
         need to duplicate it for the type.  */
index f771bed46f82c18ed47d3fc852e8edc5add4fb79..60da35b0d3a77b20791d71d63a15541ae174a3fb 100644 (file)
@@ -509,7 +509,7 @@ struct main_type
           Otherwise, physname is the mangled label of the static field.  */
 
        CORE_ADDR physaddr;
-       char *physname;
+       const char *physname;
       }
       loc;
 
index 2a8f3fce26ade1f898ec7697a4e87b3c7ef1baf6..ccd29c83b0afdd0f4bbd77d3070b5b0158d47b64 100644 (file)
@@ -2388,7 +2388,7 @@ value_static_field (struct type *type, int fieldno)
       break;
     case FIELD_LOC_KIND_PHYSNAME:
     {
-      char *phys_name = TYPE_FIELD_STATIC_PHYSNAME (type, fieldno);
+      const char *phys_name = TYPE_FIELD_STATIC_PHYSNAME (type, fieldno);
       /* TYPE_FIELD_NAME (type, fieldno); */
       struct symbol *sym = lookup_symbol (phys_name, 0, VAR_DOMAIN, 0);