diff options
author | Tom Tromey <tom@tromey.com> | 2023-01-31 13:25:17 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-02-13 15:21:07 -0700 |
commit | 317c3ed9fc9bc5dacd267d131e8c9ca7c1cbdced (patch) | |
tree | 20bca3a06c842e4eed5101debd1f672539e87714 /gdb/dwarf2/expr.c | |
parent | cbe793af8831a7244de326d6b07c60c197f096a2 (diff) | |
download | binutils-317c3ed9fc9bc5dacd267d131e8c9ca7c1cbdced.zip binutils-317c3ed9fc9bc5dacd267d131e8c9ca7c1cbdced.tar.gz binutils-317c3ed9fc9bc5dacd267d131e8c9ca7c1cbdced.tar.bz2 |
Turn allocate_value into a static "constructor"
This changes allocate_value to be a static "constructor" of value.
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 d6ad0f1..fc92de8 100644 --- a/gdb/dwarf2/expr.c +++ b/gdb/dwarf2/expr.c @@ -968,7 +968,7 @@ dwarf_expr_context::fetch_result (struct type *type, struct type *subobj_type, inspecting a register ($pc, $sp, etc.), return a generic optimized out value instead, so that we show <optimized out> instead of <not saved>. */ - value *tmp = allocate_value (subobj_type); + value *tmp = value::allocate (subobj_type); value_contents_copy (tmp, 0, retval, 0, subobj_type->length ()); retval = tmp; @@ -1019,7 +1019,7 @@ dwarf_expr_context::fetch_result (struct type *type, struct type *subobj_type, if (subobj_offset + len > max) invalid_synthetic_pointer (); - retval = allocate_value (subobj_type); + retval = value::allocate (subobj_type); /* The given offset is relative to the actual object. */ if (gdbarch_byte_order (arch) == BFD_ENDIAN_BIG) @@ -1037,7 +1037,7 @@ dwarf_expr_context::fetch_result (struct type *type, struct type *subobj_type, if (subobj_offset + n > this->m_len) invalid_synthetic_pointer (); - retval = allocate_value (subobj_type); + retval = value::allocate (subobj_type); bfd_byte *contents = value_contents_raw (retval).data (); memcpy (contents, this->m_data + subobj_offset, n); } |