value: Make accessor methods' parameters const-correct
authorMartin Galvan <martin.galvan@tallertechnologies.com>
Fri, 8 Apr 2016 18:05:45 +0000 (15:05 -0300)
committerMartin Galvan <martin.galvan@tallertechnologies.com>
Fri, 8 Apr 2016 18:06:56 +0000 (15:06 -0300)
commit4bf7b526bed1c86b1f20b18e642865f446751e06
tree5a133392fcfe9a0741a1a05a5d9ed06d2d2b8812
parent136a43b762ce7bc692645cc0d9d50c934f9aa392
value: Make accessor methods' parameters const-correct

I did a quick pass over value.c and value.h and made some of the accessor methods'
pass-by-reference parameters const-correct. Besides the obvious benefits, this is
required if we want to use them on values that are already declared as const
(such as the parameters to lval_funcs).

There's probably a lot more stuff that can be made const, here and elsewhere.

gdb/ChangeLog:
2016-04-08  Martin Galvan  <martin.galvan@tallertechnologies.com>

    * value.c (value_next): Make pass-by-reference parameters const-correct.
    (value_parent): Likewise.
    (value_enclosing_type): Likewise.
    (value_lazy): Likewise.
    (value_stack): Likewise.
    (value_embedded_offset): Likewise.
    (value_pointed_to_offset): Likewise.
    (value_raw_address): Likewise.
    (deprecated_value_modifiable): Likewise.
    (value_free_to_mark): Likewise.
    (value_release_to_mark): Likewise.
    (internalvar_name): Likewise.
    (readjust_indirect_value_type): Likewise.
    (value_initialized): Likewise.
    * value.h (value_next): Likewise.
    (value_parent): Likewise.
    (value_enclosing_type): Likewise.
    (value_lazy): Likewise.
    (value_stack): Likewise.
    (value_embedded_offset): Likewise.
    (value_pointed_to_offset): Likewise.
    (value_raw_address): Likewise.
    (deprecated_value_modifiable): Likewise.
    (value_free_to_mark): Likewise.
    (value_release_to_mark): Likewise.
    (internalvar_name): Likewise.
    (readjust_indirect_value_type): Likewise.
    (value_initialized): Likewise.
gdb/ChangeLog
gdb/value.c
gdb/value.h