From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 96193 invoked by alias); 30 Sep 2016 16:19:16 -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 96162 invoked by uid 89); 30 Sep 2016 16:19:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RCVD_IN_SEMBACKSCATTER,SPF_PASS autolearn=ham version=3.3.2 spammy=disassembler, uli, sk:disasse, splits X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 30 Sep 2016 16:19:14 +0000 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u8UGI7AK146551 for ; Fri, 30 Sep 2016 12:19:13 -0400 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0b-001b2d01.pphosted.com with ESMTP id 25st5hbye3-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 30 Sep 2016 12:19:12 -0400 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 30 Sep 2016 17:19:11 +0100 Received: from d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 30 Sep 2016 17:19:09 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id B673D1B08061; Fri, 30 Sep 2016 17:21:04 +0100 (BST) Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u8UGJ92N24969482; Fri, 30 Sep 2016 16:19:09 GMT Received: from d06av01.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u8UGJ8a3018194; Fri, 30 Sep 2016 10:19:08 -0600 Received: from oc8523832656.ibm.com (dyn-9-152-213-24.boeblingen.de.ibm.com [9.152.213.24]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u8UGJ80X018189; Fri, 30 Sep 2016 10:19:08 -0600 Received: by oc8523832656.ibm.com (Postfix, from userid 500) id 6A43511C24D; Fri, 30 Sep 2016 18:19:08 +0200 (CEST) Subject: Re: [PATCH, RFC] Add support for choosing disassembler cpu in GDB for POWER. To: bergner@vnet.ibm.com (Peter Bergner) Date: Fri, 30 Sep 2016 17:55:00 -0000 From: "Ulrich Weigand" Cc: amodra@gmail.com (Alan Modra), gdb-patches@sourceware.org, binutils@sourceware.org (binutils) In-Reply-To: <70c7efa4-c47e-6afc-9572-f23e2dd852e4@vnet.ibm.com> from "Peter Bergner" at Sep 29, 2016 08:40:30 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16093016-0020-0000-0000-000002564A3B X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16093016-0021-0000-0000-00003E65BA78 Message-Id: <20160930161908.6A43511C24D@oc8523832656.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-09-30_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609280000 definitions=main-1609300296 X-SW-Source: 2016-09/txt/msg00435.txt.bz2 Peter Bergner wrote: > This patch adds the new GDB commands "set disassembler-cpu " and > "show disassembler-cpu". It also splits the one huge GDB test case into > multiple test cases without the unneeded file offsets. > > Alan and Uli, does this patch look like something we'd like? If we do want > this, what do you think of the "disassembler-cpu" command name? Is there > something better to use? Thoughts? I agree that this looks like a feature that would be nice to have. 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. I'm also not really happy about the tight integration of opcode/ppc.h and the ppc_opts struct into GDB code ... Can't we ask a BFD routine whether a particular CPU option is valid? E.g. by just making a "test" call to print_insn_* and see if it succeeds? Apart from those implementation details, I'm wondering whether we might want to generalize the feature to allow setting any disassembler option, not just CPU levels. Also, this could really be useful on any platform, not just Power :-) But I see that some other architectures already use info->disassembler_options to pass some special options, which might make the generic solution more complex. Therefore I'd be OK with just doing the Power implementation for now. Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com