From a2e66773735d2d2de2ba652e44650288c88ad752 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 6 Apr 2021 18:57:04 +0930 Subject: Return symbol from symbol_at_address_func include/ * dis-asm.h (struct disassemble_info ): Return asymbol*. binutils/ * objdump.c (objdump_symbol_at_address): Return asymbol*. opcodes/ * dis-buf.c (generic_symbol_at_address): Return symbol* NULL. * s12z-dis.c (decode_possible_symbol): Use symbol returned from symbol_at_address_func. --- include/ChangeLog | 5 +++++ include/dis-asm.h | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/ChangeLog b/include/ChangeLog index 9eb5f0a..639f2bf 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,8 @@ +2021-04-06 Alan Modra + + * dis-asm.h (struct disassemble_info ): + Return asymbol*. + 2021-04-01 Martin Liska * opcode/cr16.h (strneq): Remove strneq and use startswith. diff --git a/include/dis-asm.h b/include/dis-asm.h index 4f50084..f3562fa 100644 --- a/include/dis-asm.h +++ b/include/dis-asm.h @@ -144,13 +144,13 @@ typedef struct disassemble_info some circumstances we want to include the overlay number in the address, (normally because there is a symbol associated with that address), but sometimes we want to mask out the overlay bits. */ - int (* symbol_at_address_func) + asymbol * (*symbol_at_address_func) (bfd_vma addr, struct disassemble_info *dinfo); /* Function called to check if a SYMBOL is can be displayed to the user. This is used by some ports that want to hide special symbols when displaying debugging outout. */ - bool (* symbol_is_valid) + bool (*symbol_is_valid) (asymbol *, struct disassemble_info *dinfo); /* These are for buffer_read_memory. */ @@ -376,11 +376,11 @@ extern void perror_memory (int, bfd_vma, struct disassemble_info *); extern void generic_print_address (bfd_vma, struct disassemble_info *); -/* Always true. */ -extern int generic_symbol_at_address +/* Always NULL. */ +extern asymbol *generic_symbol_at_address (bfd_vma, struct disassemble_info *); -/* Also always true. */ +/* Always true. */ extern bool generic_symbol_is_valid (asymbol *, struct disassemble_info *); -- cgit v1.1