diff options
author | Tom Tromey <tom@tromey.com> | 2023-01-31 12:27:30 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-02-13 15:21:07 -0700 |
commit | 9feb2d07debe7d04a33cbd90f895d529b7a04f41 (patch) | |
tree | e888b8d28f7cc96be1c72adb5bc593f5297859af /gdb/valarith.c | |
parent | 8e5b19ad992b56cb3817dcbd4c656e2ffc3ee889 (diff) | |
download | binutils-9feb2d07debe7d04a33cbd90f895d529b7a04f41.zip binutils-9feb2d07debe7d04a33cbd90f895d529b7a04f41.tar.gz binutils-9feb2d07debe7d04a33cbd90f895d529b7a04f41.tar.bz2 |
Turn value_address and set_value_address functions into methods
This changes the value_address and set_value_address functions to be
methods of value.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/valarith.c')
-rw-r--r-- | gdb/valarith.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/valarith.c b/gdb/valarith.c index 98ccbc7..47493a6 100644 --- a/gdb/valarith.c +++ b/gdb/valarith.c @@ -193,7 +193,7 @@ value_subscript (struct value *array, LONGEST index) struct value *val = allocate_value (elt_type); mark_value_bytes_unavailable (val, 0, elt_size); VALUE_LVAL (val) = lval_memory; - set_value_address (val, value_address (array) + elt_size * index); + val->set_address (array->address () + elt_size * index); return val; } @@ -249,7 +249,7 @@ value_subscripted_rvalue (struct value *array, LONGEST index, { CORE_ADDR address; - address = value_address (array) + elt_offs; + address = array->address () + elt_offs; elt_type = resolve_dynamic_type (elt_type, {}, address); } |