diff options
author | Tom Tromey <tom@tromey.com> | 2023-01-31 13:24:00 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-02-13 15:21:07 -0700 |
commit | cbe793af8831a7244de326d6b07c60c197f096a2 (patch) | |
tree | ebdab02eb11031a7b713952444ea5a7257a523d6 /gdb/findvar.c | |
parent | f29de665046c1b1a2feabf8d3d584b3b89699e10 (diff) | |
download | gdb-cbe793af8831a7244de326d6b07c60c197f096a2.zip gdb-cbe793af8831a7244de326d6b07c60c197f096a2.tar.gz gdb-cbe793af8831a7244de326d6b07c60c197f096a2.tar.bz2 |
Turn allocate_value_lazy into a static "constructor"
This changes allocate_value_lazy to be a static "constructor" of
struct value.
I considered trying to change value to use ordinary new/delete, but it
seems to me that due to reference counting, we may someday want to
change these static constructors to return value_ref_ptr instead.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/findvar.c')
-rw-r--r-- | gdb/findvar.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/findvar.c b/gdb/findvar.c index 9420286..cb4eb75 100644 --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -294,7 +294,7 @@ value_of_register_lazy (frame_info_ptr frame, int regnum) /* We should have a valid next frame. */ gdb_assert (frame_id_p (get_frame_id (next_frame))); - reg_val = allocate_value_lazy (register_type (gdbarch, regnum)); + reg_val = value::allocate_lazy (register_type (gdbarch, regnum)); VALUE_LVAL (reg_val) = lval_register; VALUE_REGNUM (reg_val) = regnum; VALUE_NEXT_FRAME_ID (reg_val) = get_frame_id (next_frame); |