aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2014-03-27 12:16:38 -0600
committerTom Tromey <tromey@redhat.com>2014-04-14 11:42:18 -0600
commitc848d64244912f9f411bec7b1c045bf14c72b61b (patch)
tree29d3b1adcd1c2714a8ebc220002c264c2d693846 /gdb
parent0626fc76d1b95c1c5b158a9b0be17791aa9078f8 (diff)
downloadgdb-c848d64244912f9f411bec7b1c045bf14c72b61b.zip
gdb-c848d64244912f9f411bec7b1c045bf14c72b61b.tar.gz
gdb-c848d64244912f9f411bec7b1c045bf14c72b61b.tar.bz2
constify value_aggregate_elt
While working on another patch I realized that value_aggregate_elt's "name" parameter ought to be const. This patch implements this. 2014-04-14 Tom Tromey <tromey@redhat.com> * valops.c (value_aggregate_elt, value_struct_elt_for_reference) (value_namespace_elt, value_maybe_namespace_elt): Make "name" const. * value.h (value_aggregate_elt): Update.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/valops.c14
-rw-r--r--gdb/value.h2
3 files changed, 15 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 14a37d8..f0aea98 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
2014-04-14 Tom Tromey <tromey@redhat.com>
+ * valops.c (value_aggregate_elt, value_struct_elt_for_reference)
+ (value_namespace_elt, value_maybe_namespace_elt): Make "name"
+ const.
+ * value.h (value_aggregate_elt): Update.
+
+2014-04-14 Tom Tromey <tromey@redhat.com>
+
* dwarf2read.c (read_enumeration_type): Handle DW_AT_type.
2014-04-14 Sanimir Agovic <sanimir.agovic@intel.com>
diff --git a/gdb/valops.c b/gdb/valops.c
index a155379..8c252d6 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -83,15 +83,15 @@ oload_classification classify_oload_match (struct badness_vector *,
static struct value *value_struct_elt_for_reference (struct type *,
int, struct type *,
- char *,
+ const char *,
struct type *,
int, enum noside);
static struct value *value_namespace_elt (const struct type *,
- char *, int , enum noside);
+ const char *, int , enum noside);
static struct value *value_maybe_namespace_elt (const struct type *,
- char *, int,
+ const char *, int,
enum noside);
static CORE_ADDR allocate_space_in_inferior (int);
@@ -3027,7 +3027,7 @@ destructor_name_p (const char *name, struct type *type)
the comment before value_struct_elt_for_reference. */
struct value *
-value_aggregate_elt (struct type *curtype, char *name,
+value_aggregate_elt (struct type *curtype, const char *name,
struct type *expect_type, int want_address,
enum noside noside)
{
@@ -3108,7 +3108,7 @@ compare_parameters (struct type *t1, struct type *t2, int skip_artificial)
static struct value *
value_struct_elt_for_reference (struct type *domain, int offset,
- struct type *curtype, char *name,
+ struct type *curtype, const char *name,
struct type *intype,
int want_address,
enum noside noside)
@@ -3337,7 +3337,7 @@ value_struct_elt_for_reference (struct type *domain, int offset,
static struct value *
value_namespace_elt (const struct type *curtype,
- char *name, int want_address,
+ const char *name, int want_address,
enum noside noside)
{
struct value *retval = value_maybe_namespace_elt (curtype, name,
@@ -3359,7 +3359,7 @@ value_namespace_elt (const struct type *curtype,
static struct value *
value_maybe_namespace_elt (const struct type *curtype,
- char *name, int want_address,
+ const char *name, int want_address,
enum noside noside)
{
const char *namespace_name = TYPE_TAG_NAME (curtype);
diff --git a/gdb/value.h b/gdb/value.h
index f846669..9425a0e 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -676,7 +676,7 @@ extern struct value *value_struct_elt_bitpos (struct value **argp,
const char *err);
extern struct value *value_aggregate_elt (struct type *curtype,
- char *name,
+ const char *name,
struct type *expect_type,
int want_address,
enum noside noside);