diff options
author | Tom Tromey <tom@tromey.com> | 2023-02-09 06:35:33 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-02-13 15:22:20 -0700 |
commit | 6f9c9d71c2420e9bc6825cef59a922f5fb863e1a (patch) | |
tree | d8a12b7cdd7bf1510afbfc13ea7f79449f99fffb /gdb/valops.c | |
parent | 43b5fba22365c6ddd0d60324833f279364b577e7 (diff) | |
download | binutils-6f9c9d71c2420e9bc6825cef59a922f5fb863e1a.zip binutils-6f9c9d71c2420e9bc6825cef59a922f5fb863e1a.tar.gz binutils-6f9c9d71c2420e9bc6825cef59a922f5fb863e1a.tar.bz2 |
Introduce set_lval method on value
This introduces the set_lval method on value, one step toward removing
deprecated_lval_hack. Ultimately I think the goal should be for some
of these set_* methods to be replaced with constructors; but I haven't
done this, as the series is already too long. Other 'deprecated'
methods can probably be handled the same way.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/valops.c')
-rw-r--r-- | gdb/valops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/valops.c b/gdb/valops.c index 7197348..a90bcbe 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -1024,7 +1024,7 @@ struct value * value_at_non_lval (struct type *type, CORE_ADDR addr) { struct value *result = value_at (type, addr); - VALUE_LVAL (result) = not_lval; + result->set_lval (not_lval); return result; } @@ -1373,7 +1373,7 @@ value_repeat (struct value *arg1, int count) val = allocate_repeat_value (arg1->enclosing_type (), count); - VALUE_LVAL (val) = lval_memory; + val->set_lval (lval_memory); val->set_address (arg1->address ()); read_value_memory (val, 0, val->stack (), val->address (), |