aboutsummaryrefslogtreecommitdiff
path: root/gdb/findvar.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/findvar.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/findvar.c')
-rw-r--r--gdb/findvar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/findvar.c b/gdb/findvar.c
index 048e439..a64b35c 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -587,7 +587,7 @@ language_defn::read_var_value (struct symbol *var,
}
/* Put the constant back in target format. */
v = value::allocate (type);
- store_signed_integer (value_contents_raw (v).data (), type->length (),
+ store_signed_integer (v->contents_raw ().data (), type->length (),
type_byte_order (type), var->value_longest ());
VALUE_LVAL (v) = not_lval;
return v;
@@ -627,7 +627,7 @@ language_defn::read_var_value (struct symbol *var,
type = resolve_dynamic_type (type, {}, /* Unused address. */ 0);
}
v = value::allocate (type);
- memcpy (value_contents_raw (v).data (), var->value_bytes (),
+ memcpy (v->contents_raw ().data (), var->value_bytes (),
type->length ());
VALUE_LVAL (v) = not_lval;
return v;
@@ -900,7 +900,7 @@ value_from_register (struct type *type, int regnum, frame_info_ptr frame)
VALUE_NEXT_FRAME_ID (v) = get_frame_id (get_next_frame_sentinel_okay (frame));
VALUE_REGNUM (v) = regnum;
ok = gdbarch_register_to_value (gdbarch, frame, regnum, type1,
- value_contents_raw (v).data (), &optim,
+ v->contents_raw ().data (), &optim,
&unavail);
if (!ok)