aboutsummaryrefslogtreecommitdiff
path: root/gdb/eval.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2024-01-19 15:32:32 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2024-01-19 21:51:56 -0500
commit7ae24327467750c445733e40d840e502795dbdf3 (patch)
tree48df8ef02f8194822d45d273ac6c92ae6d281103 /gdb/eval.c
parent4a2318c9858fdb1899157339f526df3d20e43cfe (diff)
downloadgdb-7ae24327467750c445733e40d840e502795dbdf3.zip
gdb-7ae24327467750c445733e40d840e502795dbdf3.tar.gz
gdb-7ae24327467750c445733e40d840e502795dbdf3.tar.bz2
gdb: remove SYMBOL_*_OPS macros
Remove SYMBOL_BLOCK_OPS, SYMBOL_COMPUTED_OPS and SYMBOL_REGISTER_OPS, in favor of methods on struct symbol. More changes could be done here to improve the design and make things safer, but I just wanted to do a straightforward change to remove the macros for now. Change-Id: I27adb74a28ea3c0dc9a85c2953413437cd95ad21 Reviewed-by: Kevin Buettner <kevinb@redhat.com>
Diffstat (limited to 'gdb/eval.c')
-rw-r--r--gdb/eval.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/eval.c b/gdb/eval.c
index 495effe..1529063 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -1070,13 +1070,14 @@ eval_op_var_entry_value (struct type *expect_type, struct expression *exp,
if (noside == EVAL_AVOID_SIDE_EFFECTS)
return value::zero (sym->type (), not_lval);
- if (SYMBOL_COMPUTED_OPS (sym) == NULL
- || SYMBOL_COMPUTED_OPS (sym)->read_variable_at_entry == NULL)
+ const symbol_computed_ops *computed_ops = sym->computed_ops ();
+ if (computed_ops == nullptr
+ || computed_ops->read_variable_at_entry == nullptr)
error (_("Symbol \"%s\" does not have any specific entry value"),
sym->print_name ());
frame_info_ptr frame = get_selected_frame (NULL);
- return SYMBOL_COMPUTED_OPS (sym)->read_variable_at_entry (sym, frame);
+ return computed_ops->read_variable_at_entry (sym, frame);
}
/* Helper function that implements the body of OP_VAR_MSYM_VALUE. */