From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5033 invoked by alias); 13 Nov 2012 23:46:51 -0000 Received: (qmail 5017 invoked by uid 22791); 13 Nov 2012 23:46:50 -0000 X-SWARE-Spam-Status: No, hits=-4.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-pa0-f41.google.com (HELO mail-pa0-f41.google.com) (209.85.220.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 13 Nov 2012 23:46:44 +0000 Received: by mail-pa0-f41.google.com with SMTP id fa10so5698457pad.0 for ; Tue, 13 Nov 2012 15:46:43 -0800 (PST) Received: by 10.68.209.133 with SMTP id mm5mr31426905pbc.42.1352850403029; Tue, 13 Nov 2012 15:46:43 -0800 (PST) Received: from bubble.grove.modra.org ([101.166.26.37]) by mx.google.com with ESMTPS id jw14sm6674585pbb.36.2012.11.13.15.46.40 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 13 Nov 2012 15:46:42 -0800 (PST) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 951B2EA0004; Wed, 14 Nov 2012 10:16:38 +1030 (CST) Date: Tue, 13 Nov 2012 23:46:00 -0000 From: Alan Modra To: Edjunior Barbosa Machado Cc: gdb-patches@sourceware.org, binutils@sourceware.org Subject: Re: [PATCH] Fix gdb disassemble for power6/power7 instructions Message-ID: <20121113234638.GI3056@bubble.grove.modra.org> Mail-Followup-To: Edjunior Barbosa Machado , gdb-patches@sourceware.org, binutils@sourceware.org References: <1352785540-22911-1-git-send-email-emachado@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1352785540-22911-1-git-send-email-emachado@linux.vnet.ibm.com> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-11/txt/msg00353.txt.bz2 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_*. -- Alan Modra Australia Development Lab, IBM