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/rust-lang.c | |
parent | 8e5b19ad992b56cb3817dcbd4c656e2ffc3ee889 (diff) | |
download | gdb-9feb2d07debe7d04a33cbd90f895d529b7a04f41.zip gdb-9feb2d07debe7d04a33cbd90f895d529b7a04f41.tar.gz gdb-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/rust-lang.c')
-rw-r--r-- | gdb/rust-lang.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c index f6e5089..aa15900 100644 --- a/gdb/rust-lang.c +++ b/gdb/rust-lang.c @@ -351,7 +351,7 @@ rust_val_print_slice (struct value *val, struct ui_file *stream, int recurse, llen - 1); struct value *array = allocate_value_lazy (array_type); VALUE_LVAL (array) = lval_memory; - set_value_address (array, value_as_address (base)); + array->set_address (value_as_address (base)); value_fetch_lazy (array); generic_value_print (array, stream, recurse, options, &rust_decorations); @@ -458,7 +458,7 @@ rust_language::print_enum (struct value *val, struct ui_file *stream, gdb::array_view<const gdb_byte> view (value_contents_for_printing (val).data (), val->type ()->length ()); - type = resolve_dynamic_type (type, view, value_address (val)); + type = resolve_dynamic_type (type, view, val->address ()); if (rust_empty_enum_p (type)) { @@ -1375,7 +1375,7 @@ rust_struct_anon::evaluate (struct type *expect_type, if (rust_enum_p (type)) { type = resolve_dynamic_type (type, value_contents (lhs), - value_address (lhs)); + lhs->address ()); if (rust_empty_enum_p (type)) error (_("Cannot access field %d of empty enum %s"), @@ -1438,7 +1438,7 @@ rust_structop::evaluate (struct type *expect_type, if (type->code () == TYPE_CODE_STRUCT && rust_enum_p (type)) { type = resolve_dynamic_type (type, value_contents (lhs), - value_address (lhs)); + lhs->address ()); if (rust_empty_enum_p (type)) error (_("Cannot access field %s of empty enum %s"), |