mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-05 15:15:42 +00:00
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>
This commit is contained in:
@@ -159,7 +159,7 @@ fortran_bounds_all_dims (bool lbound_p,
|
||||
gdb_assert (dst_offset + v->type ()->length ()
|
||||
<= result->type ()->length ());
|
||||
gdb_assert (v->type ()->length () == elm_len);
|
||||
value_contents_copy (result, dst_offset, v, 0, elm_len);
|
||||
v->contents_copy (result, dst_offset, 0, elm_len);
|
||||
|
||||
/* Peel another dimension of the array. */
|
||||
array_type = array_type->target_type ();
|
||||
@@ -282,8 +282,8 @@ protected:
|
||||
available offset. */
|
||||
void copy_element_to_dest (struct value *elt)
|
||||
{
|
||||
value_contents_copy (m_dest, m_dest_offset, elt, 0,
|
||||
elt->type ()->length ());
|
||||
elt->contents_copy (m_dest, m_dest_offset, 0,
|
||||
elt->type ()->length ());
|
||||
m_dest_offset += elt->type ()->length ();
|
||||
}
|
||||
|
||||
@@ -744,7 +744,7 @@ fortran_array_shape (struct gdbarch *gdbarch, const language_defn *lang,
|
||||
gdb_assert (dst_offset + v->type ()->length ()
|
||||
<= result->type ()->length ());
|
||||
gdb_assert (v->type ()->length () == elm_len);
|
||||
value_contents_copy (result, dst_offset, v, 0, elm_len);
|
||||
v->contents_copy (result, dst_offset, 0, elm_len);
|
||||
|
||||
/* Peel another dimension of the array. */
|
||||
val_type = val_type->target_type ();
|
||||
|
||||
Reference in New Issue
Block a user