aboutsummaryrefslogtreecommitdiff
path: root/gdb/value.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-01-31 12:12:39 -0700
committerTom Tromey <tom@tromey.com>2023-02-13 15:21:07 -0700
commitb9f74d5432ffeef0e2281cb09c28d4b6d0371603 (patch)
tree1c3a0a540a84dbb2cd0188166de8de451ba2580a /gdb/value.c
parentc8580184bbd1af58769d143b23d254737b08de9d (diff)
downloadbinutils-b9f74d5432ffeef0e2281cb09c28d4b6d0371603.zip
binutils-b9f74d5432ffeef0e2281cb09c28d4b6d0371603.tar.gz
binutils-b9f74d5432ffeef0e2281cb09c28d4b6d0371603.tar.bz2
Turn value_computed_closure and value_computed_funcs functions into methods
This changes the value_computed_funcs and value_computed_closure functions to be methods of value. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/value.c')
-rw-r--r--gdb/value.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gdb/value.c b/gdb/value.c
index b09ee9b..b26d4cd 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -1383,19 +1383,19 @@ value_bits_synthetic_pointer (const struct value *value,
}
const struct lval_funcs *
-value_computed_funcs (const struct value *v)
+value::computed_funcs () const
{
- gdb_assert (value_lval_const (v) == lval_computed);
+ gdb_assert (m_lval == lval_computed);
- return v->m_location.computed.funcs;
+ return m_location.computed.funcs;
}
void *
-value_computed_closure (const struct value *v)
+value::computed_closure () const
{
- gdb_assert (v->m_lval == lval_computed);
+ gdb_assert (m_lval == lval_computed);
- return v->m_location.computed.closure;
+ return m_location.computed.closure;
}
enum lval_type *
@@ -3697,7 +3697,7 @@ coerce_ref_if_computed (const struct value *arg)
if (value_lval_const (arg) != lval_computed)
return NULL;
- funcs = value_computed_funcs (arg);
+ funcs = arg->computed_funcs ();
if (funcs->coerce_ref == NULL)
return NULL;
@@ -4025,8 +4025,8 @@ value_fetch_lazy (struct value *val)
else if (VALUE_LVAL (val) == lval_register)
value_fetch_lazy_register (val);
else if (VALUE_LVAL (val) == lval_computed
- && value_computed_funcs (val)->read != NULL)
- value_computed_funcs (val)->read (val);
+ && val->computed_funcs ()->read != NULL)
+ val->computed_funcs ()->read (val);
else
internal_error (_("Unexpected lazy value type."));