This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH] Fix gdb disassemble for power6/power7 instructions
- From: Alan Modra <amodra at gmail dot com>
- To: Edjunior Barbosa Machado <emachado at linux dot vnet dot ibm dot com>
- Cc: gdb-patches at sourceware dot org, binutils at sourceware dot org
- Date: Wed, 14 Nov 2012 10:16:38 +1030
- Subject: Re: [PATCH] Fix gdb disassemble for power6/power7 instructions
- References: <firstname.lastname@example.org>
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