diff options
author | Tom Tromey <tromey@redhat.com> | 2011-05-18 20:19:52 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2011-05-18 20:19:52 +0000 |
commit | ff355380ea9ae6f2baa6652f77f6c24f7dd38d9c (patch) | |
tree | 01b74f8aaf7830cdcbdba0c8150f79bacdd53616 /gdb | |
parent | ed7319594583dffb825a9602afb95198207b9a0d (diff) | |
download | gdb-ff355380ea9ae6f2baa6652f77f6c24f7dd38d9c.zip gdb-ff355380ea9ae6f2baa6652f77f6c24f7dd38d9c.tar.gz gdb-ff355380ea9ae6f2baa6652f77f6c24f7dd38d9c.tar.bz2 |
* 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
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/ax-gdb.c | 2 | ||||
-rw-r--r-- | gdb/dwarf2read.c | 4 | ||||
-rw-r--r-- | gdb/gdbtypes.h | 2 | ||||
-rw-r--r-- | gdb/value.c | 2 |
5 files changed, 13 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 27c9271..3103398 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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. diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c index d1736e1..19c00ad 100644 --- a/gdb/ax-gdb.c +++ b/gdb/ax-gdb.c @@ -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) diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 562361e..658205e 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -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. */ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index f771bed..60da35b 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -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; diff --git a/gdb/value.c b/gdb/value.c index 2a8f3fc..ccd29c8 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -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); |