aboutsummaryrefslogtreecommitdiff
path: root/gdb/riscv-tdep.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-01-31 13:45:40 -0700
committerTom Tromey <tom@tromey.com>2023-02-13 15:21:08 -0700
commitbbe912ba8898f5440028a35d0a206d70a6877ed6 (patch)
tree0ffc199020a35bd2968ce1a69d3686737eca7933 /gdb/riscv-tdep.c
parentee7bb2944b75ce482dbf3bdb2d396efc98f1cf89 (diff)
downloadgdb-bbe912ba8898f5440028a35d0a206d70a6877ed6.zip
gdb-bbe912ba8898f5440028a35d0a206d70a6877ed6.tar.gz
gdb-bbe912ba8898f5440028a35d0a206d70a6877ed6.tar.bz2
Turn some value_contents functions into methods
This turns value_contents_raw, value_contents_writeable, and value_contents_all_raw into methods on value. The remaining functions will be changed later in the series; they were a bit trickier and so I didn't include them in this patch. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/riscv-tdep.c')
-rw-r--r--gdb/riscv-tdep.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c
index 375ba42..f8be46c 100644
--- a/gdb/riscv-tdep.c
+++ b/gdb/riscv-tdep.c
@@ -3278,7 +3278,7 @@ riscv_return_value (struct gdbarch *gdbarch,
type_byte_order (arg_type),
arg_type->is_unsigned ());
abi_val = value::allocate (info.type);
- unscaled.write (value_contents_raw (abi_val),
+ unscaled.write (abi_val->contents_raw (),
type_byte_order (info.type),
info.type->is_unsigned ());
}
@@ -3287,12 +3287,12 @@ riscv_return_value (struct gdbarch *gdbarch,
arg_val = value_from_contents (arg_type, writebuf);
abi_val = value_cast (info.type, arg_val);
}
- writebuf = value_contents_raw (abi_val).data ();
+ writebuf = abi_val->contents_raw ().data ();
}
else
{
abi_val = value::allocate (info.type);
- readbuf = value_contents_raw (abi_val).data ();
+ readbuf = abi_val->contents_raw ().data ();
}
arg_len = info.type->length ();
@@ -3409,7 +3409,7 @@ riscv_return_value (struct gdbarch *gdbarch,
type_byte_order (info.type),
info.type->is_unsigned ());
*read_value = value::allocate (arg_type);
- unscaled.write (value_contents_raw (*read_value),
+ unscaled.write ((*read_value)->contents_raw (),
type_byte_order (arg_type),
arg_type->is_unsigned ());
}