diff options
author | Tom Tromey <tom@tromey.com> | 2023-01-31 13:45:40 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-02-13 15:21:08 -0700 |
commit | bbe912ba8898f5440028a35d0a206d70a6877ed6 (patch) | |
tree | 0ffc199020a35bd2968ce1a69d3686737eca7933 /gdb/dwarf2/expr.c | |
parent | ee7bb2944b75ce482dbf3bdb2d396efc98f1cf89 (diff) | |
download | gdb-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/dwarf2/expr.c')
-rw-r--r-- | gdb/dwarf2/expr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/dwarf2/expr.c b/gdb/dwarf2/expr.c index bb77a96..e08dca0 100644 --- a/gdb/dwarf2/expr.c +++ b/gdb/dwarf2/expr.c @@ -164,7 +164,7 @@ rw_pieced_value (value *v, value *from, bool check_optimized) if (check_optimized) v_contents = nullptr; else - v_contents = value_contents_raw (v).data (); + v_contents = v->contents_raw ().data (); from_contents = nullptr; } @@ -1026,7 +1026,7 @@ dwarf_expr_context::fetch_result (struct type *type, struct type *subobj_type, subobj_offset += n - max; copy (value_contents_all (val).slice (subobj_offset, len), - value_contents_raw (retval)); + retval->contents_raw ()); } break; @@ -1038,7 +1038,7 @@ dwarf_expr_context::fetch_result (struct type *type, struct type *subobj_type, invalid_synthetic_pointer (); retval = value::allocate (subobj_type); - bfd_byte *contents = value_contents_raw (retval).data (); + bfd_byte *contents = retval->contents_raw ().data (); memcpy (contents, this->m_data + subobj_offset, n); } break; |