aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lang.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-01-31 14:43:22 -0700
committerTom Tromey <tom@tromey.com>2023-02-13 15:22:16 -0700
commitcda0334434412d888443e9a98386255f2e0c2eab (patch)
treef8c03f634efa3dab4e58cb8888f47c073ea21ebe /gdb/ada-lang.c
parente18312bb596fcc9b4df1d018038690df28a68b46 (diff)
downloadgdb-cda0334434412d888443e9a98386255f2e0c2eab.zip
gdb-cda0334434412d888443e9a98386255f2e0c2eab.tar.gz
gdb-cda0334434412d888443e9a98386255f2e0c2eab.tar.bz2
Turn value_copy into a method
This turns value_copy into a method of value. Much of this was written by script. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r--gdb/ada-lang.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index c11182a..e2aa404 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -1762,7 +1762,7 @@ thin_data_pntr (struct value *val)
data_type = lookup_pointer_type (data_type);
if (type->code () == TYPE_CODE_PTR)
- return value_cast (data_type, value_copy (val));
+ return value_cast (data_type, val->copy ());
else
return value_from_longest (data_type, val->address ());
}
@@ -2190,7 +2190,7 @@ ada_coerce_to_simple_array_ptr (struct value *arr)
if (arrType == NULL)
return NULL;
- return value_cast (arrType, value_copy (desc_data (arr)));
+ return value_cast (arrType, desc_data (arr)->copy ());
}
else if (ada_is_constrained_packed_array_type (arr->type ()))
return decode_constrained_packed_array (arr);
@@ -2920,7 +2920,7 @@ ada_value_assign (struct value *toval, struct value *fromval)
bits, is_big_endian);
write_memory_with_notification (to_addr, buffer, len);
- val = value_copy (toval);
+ val = toval->copy ();
memcpy (val->contents_raw ().data (),
fromval->contents ().data (),
type->length ());
@@ -3073,7 +3073,7 @@ ada_value_ptr_subscript (struct value *arr, int arity, struct value **ind)
if (type->code () != TYPE_CODE_ARRAY)
error (_("too many subscripts (%d expected)"), k);
arr = value_cast (lookup_pointer_type (type->target_type ()),
- value_copy (arr));
+ arr->copy ());
get_discrete_bounds (type->index_type (), &lwb, &upb);
arr = value_ptradd (arr, pos_atr (ind[k]) - lwb);
type = type->target_type ();