From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 51674 invoked by alias); 17 Nov 2016 19:52:05 -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 51651 invoked by uid 89); 17 Nov 2016 19:52:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy= 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; Thu, 17 Nov 2016 19:51:54 +0000 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id uAHJoZ0f121540 for ; Thu, 17 Nov 2016 14:51:53 -0500 Received: from e37.co.us.ibm.com (e37.co.us.ibm.com [32.97.110.158]) by mx0a-001b2d01.pphosted.com with ESMTP id 26sgf7yqsc-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 17 Nov 2016 14:51:53 -0500 Received: from localhost by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 17 Nov 2016 12:51:51 -0700 Received: from d03dlp03.boulder.ibm.com (9.17.202.179) by e37.co.us.ibm.com (192.168.1.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 17 Nov 2016 12:51:49 -0700 Received: from b03cxnp07029.gho.boulder.ibm.com (b03cxnp07029.gho.boulder.ibm.com [9.17.130.16]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id C85CF19D806A; Thu, 17 Nov 2016 12:51:07 -0700 (MST) Received: from b03ledav002.gho.boulder.ibm.com (b03ledav002.gho.boulder.ibm.com [9.17.130.233]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id uAHJpj6Z15991180; Thu, 17 Nov 2016 12:51:45 -0700 Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6018113603A; Thu, 17 Nov 2016 12:51:45 -0700 (MST) Received: from otta.rchland.ibm.com (unknown [9.10.86.72]) by b03ledav002.gho.boulder.ibm.com (Postfix) with ESMTP id 00D52136040; Thu, 17 Nov 2016 12:51:44 -0700 (MST) Subject: Re: [PATCH 1/2] Add support for setting disassembler-options in GDB for POWER, ARM and S390 To: gdb-patches@sourceware.org References: Cc: Ulrich Weigand , Pedro Alves , Alan Modra , binutils From: Peter Bergner Date: Thu, 17 Nov 2016 19:52:00 -0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16111719-0024-0000-0000-0000150BE773 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006095; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000189; SDB=6.00782059; UDB=6.00377335; IPR=6.00559564; BA=6.00004889; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00013363; XFM=3.00000011; UTC=2016-11-17 19:51:51 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16111719-0025-0000-0000-00004638F06A Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-11-17_11:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1611170341 X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg00495.txt.bz2 On 11/17/16 1:18 PM, Peter Bergner wrote: > Ping. This is the same as my last patch posted here: > > https://sourceware.org/ml/binutils/2016-11/msg00029.html > > ...except for that we no longer output "default" for a NULL > disassembler_options value, and instead just output ''. > I will note that doing "set disassembler-options" does reset > the disassembler_options value to NULL. I will note I only tested ARM and S390 using a cross debugger, but they seem to work fine. In addition, I was able to confirm that using "set disassembler-options ..." and "set arm disassembler ..." together works fine, meaning you can use them interchangeably. The only "gotcha", is that "set arm disassembler ..." uses short option names, while the "set disassebler-options ..." has to use the canonical long names (eg, "set arm disassembler atpcs" versus "set disassembler-options reg-names-atpcs"). That above said, a little testing of ARM and S390 by others would be appreciated. I did try and take a stab converting i386 over as well, but opcodes/i386-dis.c:print_insn() contains a lot of global state that really should be moved into a disassemble_init_i386() similar to what I did for S390. There really is no reason to parse info->disassembler_options for each insn we print. However, I didn't trust myself at getting that all correct, so I'll leave it to someone more qualified to do. Peter