forked from Imagelibrary/binutils-gdb
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>
This commit is contained in:
committed by
Simon Marchi
parent
4a2318c985
commit
7ae2432746
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user