From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 99336 invoked by alias); 6 Oct 2016 04:44:14 -0000 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 Received: (qmail 99304 invoked by uid 89); 6 Oct 2016 04:44:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy= X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-pf0-f196.google.com Received: from mail-pf0-f196.google.com (HELO mail-pf0-f196.google.com) (209.85.192.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 06 Oct 2016 04:44:12 +0000 Received: by mail-pf0-f196.google.com with SMTP id n24so475679pfb.3; Wed, 05 Oct 2016 21:44:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=mhhiTKHuGuS8ItFChDmkvNjGDlBeWdYxQiN5dadNBjk=; b=TPOJgm1PNGElJQplmaZxYv9sksn9LUOHom4wvPj36chOgnXG/E47T2GhiFUiS1oEmX eQpMkIRn5lQnCBqp025x9KXSRsQa21mSCpoUbmMm0HRkep6FEEeoNuer+M2oO8UykAog OEujNU6Z6ZYkjIqHLUpe12r2/cJpxoPLKtlhhV7HfPg1L8sskv8EtQG022JDZETNj3wp BOtCQMP4PeWfy4TOP39T58TyH2VNxOLA50it9UMPgwqF1EDRKTF0xOmksz/OJrnOiyxg SY9F+k3+l0XJsrkqbL0YzdNNchqnn+etkh7M1SmfXxMKpV37QhDafVGS9hkXyc1tOrYC DN0g== X-Gm-Message-State: AA6/9Rk19KeT8E3Nulcsb7qOvWI+vopY5voIoyblkbn+T+KocMreMGdkEK1Usy+wYc2+Bg== X-Received: by 10.98.202.5 with SMTP id n5mr7844944pfg.63.1475729050824; Wed, 05 Oct 2016 21:44:10 -0700 (PDT) Received: from bubble.grove.modra.org (CPE-58-160-71-80.tyqh2.lon.bigpond.net.au. [58.160.71.80]) by smtp.gmail.com with ESMTPSA id zh13sm18196976pab.4.2016.10.05.21.44.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Oct 2016 21:44:10 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id BB452C196A; Thu, 6 Oct 2016 15:14:05 +1030 (ACDT) Date: Thu, 06 Oct 2016 04:44:00 -0000 From: Alan Modra To: Peter Bergner Cc: Ulrich Weigand , gdb-patches@sourceware.org, binutils Subject: Re: [PATCH, RFC] Add support for choosing disassembler cpu in GDB for POWER. Message-ID: <20161006044405.GY4877@bubble.grove.modra.org> References: <20160930161908.6A43511C24D@oc8523832656.ibm.com> <20161003222527.GO4877@bubble.grove.modra.org> <5a66aca9-dfe9-7c44-21f9-27774a07d143@vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5a66aca9-dfe9-7c44-21f9-27774a07d143@vnet.ibm.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-SW-Source: 2016-10/txt/msg00105.txt.bz2 On Wed, Oct 05, 2016 at 10:00:45PM -0500, Peter Bergner wrote: > On 10/3/16 5:25 PM, Alan Modra wrote: > > Somewhere in gdb you must be calling disassemble_init_for_target. > > Why can't you call that again after setting the cpu (in struct > > disassemble_info disassembler_options)? > > We (rs6000-tdep.c) don't call disassemble_init_for_target(). That is done > by architecture independent gdb code before gdb_print_insn_powerpc() is > ever called. We could call it from there, but as I mentioned in one of > my previous notes, we'd be doing that before every insn we emit, which > would be very expensive. > > The problem is, currently there is no way for the target to catch the > disassembly initialization process to modify the struct disassemble_info > disassembler_options value before we start emitting insns. That said, > how about the following patch which adds that ability? Thanks, the opcodes side of this patch looks OK to me. -- Alan Modra Australia Development Lab, IBM