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/findvar.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/findvar.c')
-rw-r--r-- | gdb/findvar.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/findvar.c b/gdb/findvar.c index cb4eb75..b59962c 100644 --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -586,7 +586,7 @@ language_defn::read_var_value (struct symbol *var, type = resolve_dynamic_type (type, {}, /* Unused address. */ 0); } /* Put the constant back in target format. */ - v = allocate_value (type); + v = value::allocate (type); store_signed_integer (value_contents_raw (v).data (), type->length (), type_byte_order (type), var->value_longest ()); VALUE_LVAL (v) = not_lval; @@ -626,7 +626,7 @@ language_defn::read_var_value (struct symbol *var, /* Value is a constant byte-sequence and needs no memory access. */ type = resolve_dynamic_type (type, {}, /* Unused address. */ 0); } - v = allocate_value (type); + v = value::allocate (type); memcpy (value_contents_raw (v).data (), var->value_bytes (), type->length ()); VALUE_LVAL (v) = not_lval; @@ -801,7 +801,7 @@ default_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_id frame_id) { int len = type->length (); - struct value *value = allocate_value (type); + struct value *value = value::allocate (type); frame_info_ptr frame; VALUE_LVAL (value) = lval_register; @@ -895,7 +895,7 @@ value_from_register (struct type *type, int regnum, frame_info_ptr frame) the corresponding [integer] type (see Alpha). The assumption is that gdbarch_register_to_value populates the entire value including the location. */ - v = allocate_value (type); + v = value::allocate (type); VALUE_LVAL (v) = lval_register; VALUE_NEXT_FRAME_ID (v) = get_frame_id (get_next_frame_sentinel_okay (frame)); VALUE_REGNUM (v) = regnum; |