Decode function entry mask on VAXen

Alan Modra amodra@bigpond.net.au
Wed Mar 9 00:45:00 GMT 2005


On Tue, Mar 08, 2005 at 09:30:18PM +0100, Jan-Benedict Glaw wrote:
> On Tue, Mar 08, 2005 at 10:44:00PM +1030, Alan Modra wrote:
> > objdump already breaks up calls to disassemble_bytes into the pieces of
> > a section between two defined symbols (possibly validated by a target
> > symbol_is_valid function).  So if the only symbols in vax code are those
> > at the beginning of a function, your idea of using last_symbol_address
> > will work.  However, I think it would be better to pass
> > "asymbol *last_symbol" instead, which gives your backend disassembler_fn
> > a chance to deal with non-function symbols that might appear in code.
> 
> Here's a new version, which indeed works even better than the previous
> version (correctly, there's no entry mask decoded for hand-crafted
> assembler parts that we jump to). Could you please also comment on this?

Supply a changelog entry, and it's good to commit with a few minor
changes.

> +#define FORCE_DISASSEMBLE	0x40000000	/* Force disassembly of the
> +						   address, even if it was
> +						   probably better handled in
> +						   a different way  */

I would just comment this as "/* --disassemble-all given.  */"

> +  /* Decode function entry mask.  */
> +  if (info->last_symbol
> +		  && (info->last_symbol->flags & BSF_FUNCTION)
> +		  && !(info->flags & FORCE_DISASSEMBLE)
> +		  && memaddr == bfd_asymbol_value (info->last_symbol))

Formatting.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list