From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54356 invoked by alias); 28 Oct 2016 14:10:30 -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 53811 invoked by uid 89); 28 Oct 2016 14:10:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 28 Oct 2016 14:10:27 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BF9F990E40; Fri, 28 Oct 2016 14:10:26 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9SEAMNM000774; Fri, 28 Oct 2016 10:10:23 -0400 Subject: Re: [PATCH, RFC] Add support for choosing disassembler cpu in GDB for POWER. To: Peter Bergner , Ulrich Weigand References: <20161012082525.3250910FDC3@oc8523832656.ibm.com> <88940498-822b-b192-b983-d8571a81ad87@redhat.com> Cc: Alan Modra , gdb-patches@sourceware.org, binutils From: Pedro Alves Message-ID: <2c62687d-f013-5af8-96ae-d7f56d28c218@redhat.com> Date: Fri, 28 Oct 2016 14:10:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-10/txt/msg00802.txt.bz2 On 10/28/2016 02:47 PM, Peter Bergner wrote: > On 10/27/16 4:40 AM, Pedro Alves wrote: >> I couldn't quite get why you need so much power specific parsing >> code in ppc-tdep.c, though. What would be necessary to be able to >> move most of that set/show handling to the common code? > > Working on that now. > > >> I also wonder if you really want to stick with >> "set powerpc disassembler " instead of >> "set powerpc disassembler-options ". >> >> I.e., I wonder about making the power one defined exactly like: >> >> "like 'set disassembler-options', but sets power disassembler >> options even if the current arch is not power." > > Once we move all of this code to generic code, do we really > even need the arch specific command? > Maybe not. Where are the per-arch settings stored? Consider a multi-arch/combined gdb. If I do: (gdb) thread 1.1 # PPC (gdb) set disassembler-options power9 (gdb) thread 2.1 # ARM (gdb) set disassembler-options reg-names-gcc (gdb) thread 1.1 # PPC (gdb) show disassembler-options and the last "show" still remembers I had chosen power9, then I'm happy without the arch specific command. Maybe it doesn't even make sense to consider this setting per-arch. Maybe per-inferior would be better. Thanks, Pedro Alves