Return symbol from symbol_at_address_func
include/ * dis-asm.h (struct disassemble_info <symbol_at_address_func>): 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.
This commit is contained in:
parent
4db29512ce
commit
a2e6677373
7 changed files with 32 additions and 30 deletions
|
@ -1459,14 +1459,16 @@ objdump_print_address (bfd_vma vma, struct disassemble_info *inf)
|
|||
|
||||
/* Determine if the given address has a symbol associated with it. */
|
||||
|
||||
static int
|
||||
static asymbol *
|
||||
objdump_symbol_at_address (bfd_vma vma, struct disassemble_info * inf)
|
||||
{
|
||||
asymbol * sym;
|
||||
|
||||
sym = find_symbol_for_address (vma, inf, NULL);
|
||||
if (sym != NULL && bfd_asymbol_value (sym) == vma)
|
||||
return sym;
|
||||
|
||||
return (sym != NULL && (bfd_asymbol_value (sym) == vma));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Hold the last function name and the last line number we displayed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue