aboutsummaryrefslogtreecommitdiff
path: root/gdb/f-lang.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-01-31 12:27:30 -0700
committerTom Tromey <tom@tromey.com>2023-02-13 15:21:07 -0700
commit9feb2d07debe7d04a33cbd90f895d529b7a04f41 (patch)
treee888b8d28f7cc96be1c72adb5bc593f5297859af /gdb/f-lang.c
parent8e5b19ad992b56cb3817dcbd4c656e2ffc3ee889 (diff)
downloadgdb-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/f-lang.c')
-rw-r--r--gdb/f-lang.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gdb/f-lang.c b/gdb/f-lang.c
index 57c31ef..68d4516 100644
--- a/gdb/f-lang.c
+++ b/gdb/f-lang.c
@@ -408,7 +408,7 @@ fortran_associated (struct gdbarch *gdbarch, const language_defn *lang,
if (pointer_type->code () == TYPE_CODE_PTR)
pointer_addr = value_as_address (pointer);
else
- pointer_addr = value_address (pointer);
+ pointer_addr = pointer->address ();
/* The single argument case, is POINTER associated with anything? */
if (target == nullptr)
@@ -470,7 +470,7 @@ fortran_associated (struct gdbarch *gdbarch, const language_defn *lang,
if (target_type->code () == TYPE_CODE_PTR)
target_addr = value_as_address (target);
else
- target_addr = value_address (target);
+ target_addr = target->address ();
/* Wrap the following checks inside a do { ... } while (false) loop so
that we can use `break' to jump out of the loop. */
@@ -1074,7 +1074,7 @@ eval_op_f_loc (struct type *expect_type, struct expression *exp,
else
result_type = builtin_f_type (exp->gdbarch)->builtin_integer_s8;
- LONGEST result_value = value_address (arg1);
+ LONGEST result_value = arg1->address ();
return value_from_longest (result_type, result_value);
}
@@ -1410,7 +1410,7 @@ fortran_undetermined::value_subarray (value *array,
debug_printf (" |-> Total offset: %s\n",
plongest (total_offset));
debug_printf (" |-> Base address: %s\n",
- core_addr_to_string (value_address (array)));
+ core_addr_to_string (array->address ()));
debug_printf (" '-> Contiguous = %s\n",
(is_all_contiguous ? "Yes" : "No"));
}
@@ -1446,13 +1446,13 @@ fortran_undetermined::value_subarray (value *array,
> check_typedef (array->type ())->length ()))
{
fortran_array_walker<fortran_lazy_array_repacker_impl> p
- (array_slice_type, value_address (array) + total_offset, dest);
+ (array_slice_type, array->address () + total_offset, dest);
p.walk ();
}
else
{
fortran_array_walker<fortran_array_repacker_impl> p
- (array_slice_type, value_address (array) + total_offset,
+ (array_slice_type, array->address () + total_offset,
total_offset, array, dest);
p.walk ();
}
@@ -1470,11 +1470,11 @@ fortran_undetermined::value_subarray (value *array,
|| (total_offset + array_slice_type->length ()
> check_typedef (array->type ())->length ()))
array = value_at_lazy (array_slice_type,
- value_address (array) + total_offset);
+ array->address () + total_offset);
else
array = value_from_contents_and_address
(array_slice_type, value_contents (array).data () + total_offset,
- value_address (array) + total_offset);
+ array->address () + total_offset);
}
else if (!array->lazy ())
array = value_from_component (array, array_slice_type, total_offset);
@@ -1632,7 +1632,7 @@ fortran_structop_operation::evaluate (struct type *expect_type,
if (is_dynamic_type (elt_type))
{
const gdb_byte *valaddr = value_contents_for_printing (elt).data ();
- CORE_ADDR address = value_address (elt);
+ CORE_ADDR address = elt->address ();
gdb::array_view<const gdb_byte> view
= gdb::make_array_view (valaddr, elt_type->length ());
elt_type = resolve_dynamic_type (elt_type, view, address);