aboutsummaryrefslogtreecommitdiff
path: root/gdb/compile
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/compile
parent4a2318c9858fdb1899157339f526df3d20e43cfe (diff)
downloadbinutils-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/compile')
-rw-r--r--gdb/compile/compile-c-symbols.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/gdb/compile/compile-c-symbols.c b/gdb/compile/compile-c-symbols.c
index f55438d..9e15709 100644
--- a/gdb/compile/compile-c-symbols.c
+++ b/gdb/compile/compile-c-symbols.c
@@ -563,7 +563,8 @@ generate_c_for_for_one_variable (compile_instance *compiler,
stream->write (local_file.c_str (), local_file.size ());
}
- if (SYMBOL_COMPUTED_OPS (sym) != NULL)
+ if (const symbol_computed_ops *computed_ops = sym->computed_ops ();
+ computed_ops != nullptr)
{
gdb::unique_xmalloc_ptr<char> generated_name
= c_symbol_substitution_name (sym);
@@ -571,11 +572,9 @@ generate_c_for_for_one_variable (compile_instance *compiler,
occurs in the middle. */
string_file local_file;
- SYMBOL_COMPUTED_OPS (sym)->generate_c_location (sym, &local_file,
- gdbarch,
- registers_used,
- pc,
- generated_name.get ());
+ computed_ops->generate_c_location (sym, &local_file, gdbarch,
+ registers_used, pc,
+ generated_name.get ());
stream->write (local_file.c_str (), local_file.size ());
}
else