aboutsummaryrefslogtreecommitdiff
path: root/gdb/rust-lang.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-02-01 07:27:50 -0700
committerTom Tromey <tom@tromey.com>2023-02-13 15:22:17 -0700
commit6c49729e593cd1577080b082be81fe113f8d7943 (patch)
tree689669836ab3ee33e0aa5d479de325d1a954d4d3 /gdb/rust-lang.c
parente3fb3c4772d81a7deb26a3c1af253e9f01b07716 (diff)
downloadgdb-6c49729e593cd1577080b082be81fe113f8d7943.zip
gdb-6c49729e593cd1577080b082be81fe113f8d7943.tar.gz
gdb-6c49729e593cd1577080b082be81fe113f8d7943.tar.bz2
Turn various value copying-related functions into methods
This patch turns a grab bag of value functions to methods of value. These are done together because their implementations are interrelated. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/rust-lang.c')
-rw-r--r--gdb/rust-lang.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c
index a5be110..013b8a4 100644
--- a/gdb/rust-lang.c
+++ b/gdb/rust-lang.c
@@ -1382,7 +1382,7 @@ rust_struct_anon::evaluate (struct type *expect_type,
field_number, type->name ());
int fieldno = rust_enum_variant (type);
- lhs = value_primitive_field (lhs, 0, fieldno, type);
+ lhs = lhs->primitive_field (0, fieldno, type);
outer_type = type;
type = lhs->type ();
}
@@ -1418,7 +1418,7 @@ rust_struct_anon::evaluate (struct type *expect_type,
field_number, type->name ());
}
- return value_primitive_field (lhs, 0, field_number, type);
+ return lhs->primitive_field (0, field_number, type);
}
else
error(_("Anonymous field access is only allowed on tuples, \
@@ -1445,7 +1445,7 @@ rust_structop::evaluate (struct type *expect_type,
field_name, type->name ());
int fieldno = rust_enum_variant (type);
- lhs = value_primitive_field (lhs, 0, fieldno, type);
+ lhs = lhs->primitive_field (0, fieldno, type);
struct type *outer_type = type;
type = lhs->type ();