From: Simon Marchi Date: Wed, 18 Nov 2015 15:51:17 +0000 (+0000) Subject: Constify value_cstring X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e3a3797ee558f4f84c67a65e1d9abce845f15abd;p=binutils-gdb.git Constify value_cstring gdb/ChangeLog: 2015-11-18 Simon Marchi * valops.c (value_cstring): Constify 'ptr' parameter. * value.h (value_cstring): Constify 'ptr' parameter. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a7b44fefd88..32f813451fd 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2015-11-18 Simon Marchi + + * valops.c (value_cstring): Constify 'ptr' parameter. + * value.h (value_cstring): Constify 'ptr' parameter. + 2015-11-18 Yao Qi * aarch64-tdep.c (pass_in_v): Add argument len. Add local array diff --git a/gdb/valops.c b/gdb/valops.c index 1e372efc88b..67e6afe548d 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -1626,7 +1626,7 @@ value_array (int lowbound, int highbound, struct value **elemvec) } struct value * -value_cstring (char *ptr, ssize_t len, struct type *char_type) +value_cstring (const char *ptr, ssize_t len, struct type *char_type) { struct value *val; int lowbound = current_language->string_lower_bound; diff --git a/gdb/value.h b/gdb/value.h index 0a4bc473f4c..94a22340dce 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -696,7 +696,7 @@ extern struct value *value_mark (void); extern void value_free_to_mark (struct value *mark); -extern struct value *value_cstring (char *ptr, ssize_t len, +extern struct value *value_cstring (const char *ptr, ssize_t len, struct type *char_type); extern struct value *value_string (char *ptr, ssize_t len, struct type *char_type);