[PATCH] Fix gdb disassemble for power6/power7 instructions
Tue Nov 13 23:46:00 GMT 2012
On Tue, Nov 13, 2012 at 03:45:40AM -0200, Edjunior Barbosa Machado wrote:
> * ppc-dis.c (powerpc_init_dialect): If not defined, set
> info->disassembler_options to "any" or, if debugging an E500 binary,
> to "e500x2".
I don't like this change as it effectively disables later code that
tries to select a default, in particular breaking vle. The problem is
that the default code is somewhat lacking to say the least, and broken
in the way PPC_OPCODE_64 is handled.
What I think should happen is that the default handling, ie. the block
that starts with
if ((dialect & ~(ppc_cpu_t) PPC_OPCODE_64) == 0)
should be deleted and a switch on info->mach setting up dialect added
before we parse disassembler_options. That way -m32 and -m64 can
override the default as they are supposed to. See bfd/archures.c for
values of bfd_mach_ppc_*.
Australia Development Lab, IBM
More information about the Binutils