diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2024-01-19 15:32:32 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2024-01-19 21:51:56 -0500 |
commit | 7ae24327467750c445733e40d840e502795dbdf3 (patch) | |
tree | 48df8ef02f8194822d45d273ac6c92ae6d281103 /gdb/stack.c | |
parent | 4a2318c9858fdb1899157339f526df3d20e43cfe (diff) | |
download | binutils-7ae24327467750c445733e40d840e502795dbdf3.zip binutils-7ae24327467750c445733e40d840e502795dbdf3.tar.gz binutils-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/stack.c')
-rw-r--r-- | gdb/stack.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/gdb/stack.c b/gdb/stack.c index 96a9cd4..31b8934 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -547,18 +547,16 @@ read_frame_arg (const frame_print_options &fp_opts, } } - if (SYMBOL_COMPUTED_OPS (sym) != NULL - && SYMBOL_COMPUTED_OPS (sym)->read_variable_at_entry != NULL - && fp_opts.print_entry_values != print_entry_values_no - && (fp_opts.print_entry_values != print_entry_values_if_needed - || !val || val->optimized_out ())) + if (const symbol_computed_ops *computed_ops = sym->computed_ops (); + (computed_ops != nullptr + && computed_ops->read_variable_at_entry != nullptr + && fp_opts.print_entry_values != print_entry_values_no + && (fp_opts.print_entry_values != print_entry_values_if_needed || !val + || val->optimized_out ()))) { try { - const struct symbol_computed_ops *ops; - - ops = SYMBOL_COMPUTED_OPS (sym); - entryval = ops->read_variable_at_entry (sym, frame); + entryval = computed_ops->read_variable_at_entry (sym, frame); } catch (const gdb_exception_error &except) { |