From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 70502 invoked by alias); 3 Oct 2016 22:25:39 -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 70443 invoked by uid 89); 3 Oct 2016 22:25:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Lab, Hx-languages-length:854, HX-Received:10.66.158.200, 15pm X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-pa0-f67.google.com Received: from mail-pa0-f67.google.com (HELO mail-pa0-f67.google.com) (209.85.220.67) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 03 Oct 2016 22:25:34 +0000 Received: by mail-pa0-f67.google.com with SMTP id r9so8353504paz.1; Mon, 03 Oct 2016 15:25:33 -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=8LxPlqB19EQvRckfTeFzjvY6B7QhQjF2d+tzwTJVWeE=; b=SLlBWAQhvscFnGZucvj1FUFUqEMlwLq1WPO/Tkq6O5kYaxTHN1QYp1uZwI1z/NM/L9 BnY/37ZzSBp9MD9nreGTeQTczX8/IwT70ksavE1Z/0Pv2feRTSuZnTv6LY0k/UOSYBUo GZuNZMKvcSiybrYphFPOPqtZX2M97Ojlacu9m86mD9ioLcuqvAo1O6RVXAWmsPLufabW TpEHYqKCY6hFGe16RTL43pSPIQLgWzpPWJlvg1U3SAimy08IDFs9hLCW+9tXkVw1O07A Fw5hdzqvoi2deJNvi+bpT0fHh+tm7MTpQD7iIgf6L2FEw7SmEDH2bEaKW8ybEREvRfxV daTw== X-Gm-Message-State: AA6/9RlBlfsU60DJYuWUgSRik+6o7MlLdUufToDNX7dA+d7D7r7mj3RtA/ftNObPmMDs4A== X-Received: by 10.66.158.200 with SMTP id ww8mr554635pab.116.1475533532604; Mon, 03 Oct 2016 15:25:32 -0700 (PDT) Received: from bubble.grove.modra.org (CPE-58-160-146-233.sa.bigpond.net.au. [58.160.146.233]) by smtp.gmail.com with ESMTPSA id z66sm41614322pfd.11.2016.10.03.15.25.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Oct 2016 15:25:31 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 76DD4C17A6; Tue, 4 Oct 2016 08:55:27 +1030 (ACDT) Date: Mon, 03 Oct 2016 22:25: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: <20161003222527.GO4877@bubble.grove.modra.org> References: <20160930161908.6A43511C24D@oc8523832656.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-SW-Source: 2016-10/txt/msg00031.txt.bz2 On Mon, Oct 03, 2016 at 03:25:15PM -0500, Peter Bergner wrote: > On 9/30/16 11:19 AM, Ulrich Weigand wrote: > > The implementation in the patch does appear to be a bit ad-hoc, however :-) > > Why would we want to pass that information via a new global variable, if > > there is already an element "disassembler_options" in the struct > > disassemble_info that GDB passes to bfd? See e.g. i386_print_insn. > > Yes, I saw that code. The problem is that same solution won't work for > us, since print_insn_*() doesn't look at info->disassembler_options > at all. 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)? -- Alan Modra Australia Development Lab, IBM