diff options
author | Tom Tromey <tom@tromey.com> | 2020-11-10 15:46:17 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2020-11-10 15:46:19 -0700 |
commit | baf20f7627811d7bd96806ee5ff756899159fd70 (patch) | |
tree | 1f37214e9da6c69358518f8af183930ad4ed9bee | |
parent | caaece0e2f523049d77ca1bafc1fea911f9c25c7 (diff) | |
download | gdb-baf20f7627811d7bd96806ee5ff756899159fd70.zip gdb-baf20f7627811d7bd96806ee5ff756899159fd70.tar.gz gdb-baf20f7627811d7bd96806ee5ff756899159fd70.tar.bz2 |
Make internalvar_name return a const char *
This changes internalvar_name to return a const char *.
gdb/ChangeLog
2020-11-10 Tom Tromey <tom@tromey.com>
* value.h (internalvar_name): Update.
* value.c (internalvar_name): Make return type const.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/value.c | 2 | ||||
-rw-r--r-- | gdb/value.h | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d275ee7..84fa187 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2020-11-10 Tom Tromey <tom@tromey.com> + * value.h (internalvar_name): Update. + * value.c (internalvar_name): Make return type const. + +2020-11-10 Tom Tromey <tom@tromey.com> + * ax-gdb.c (gen_struct_elt_for_reference, gen_namespace_elt) (gen_maybe_namespace_elt, gen_aggregate_elt_ref, gen_expr): Use const. diff --git a/gdb/value.c b/gdb/value.c index 7db3d3e..c9907fa 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -2379,7 +2379,7 @@ clear_internalvar (struct internalvar *var) var->kind = INTERNALVAR_VOID; } -char * +const char * internalvar_name (const struct internalvar *var) { return var->name; diff --git a/gdb/value.h b/gdb/value.h index 644501f..bc57f4f 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -1122,7 +1122,7 @@ extern void print_variable_and_value (const char *name, extern void typedef_print (struct type *type, struct symbol *news, struct ui_file *stream); -extern char *internalvar_name (const struct internalvar *var); +extern const char *internalvar_name (const struct internalvar *var); extern void preserve_values (struct objfile *); |