From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 76489 invoked by alias); 21 Jun 2018 17:52:21 -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 73383 invoked by uid 89); 21 Jun 2018 17:52:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-12.2 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT autolearn=ham version=3.3.2 spammy= X-HELO: sesbmg23.ericsson.net Received: from sesbmg23.ericsson.net (HELO sesbmg23.ericsson.net) (193.180.251.37) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 21 Jun 2018 17:52:18 +0000 Received: from ESESBMB503.ericsson.se (Unknown_Domain [153.88.183.116]) by sesbmg23.ericsson.net (Symantec Mail Security) with SMTP id CB.3F.31551.FC5EB2B5; Thu, 21 Jun 2018 19:52:16 +0200 (CEST) Received: from ESESBMR505.ericsson.se (153.88.183.201) by ESESBMB503.ericsson.se (153.88.183.170) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Thu, 21 Jun 2018 19:52:15 +0200 Received: from ESESSMB505.ericsson.se (153.88.183.166) by ESESBMR505.ericsson.se (153.88.183.201) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Thu, 21 Jun 2018 19:52:15 +0200 Received: from NAM03-CO1-obe.outbound.protection.outlook.com (153.88.183.157) by ESESSMB505.ericsson.se (153.88.183.166) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3 via Frontend Transport; Thu, 21 Jun 2018 19:52:15 +0200 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=simon.marchi@ericsson.com; Received: from [142.133.60.192] (192.75.88.130) by BN7PR15MB2385.namprd15.prod.outlook.com (2603:10b6:406:8c::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.863.17; Thu, 21 Jun 2018 17:52:11 +0000 Subject: Re: [PATCH v4] GDB PR tdep/8282: MIPS: Wire in `set disassembler-options' To: "Maciej W. Rozycki" , Simon Marchi , , CC: Joel Brobecker , Fredrik Noring References: From: Simon Marchi Message-ID: <3bd95a5f-e43e-2efe-e261-c2cf30d06d14@ericsson.com> Date: Thu, 21 Jun 2018 17:52:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SN4PR0501CA0136.namprd05.prod.outlook.com (2603:10b6:803:2c::14) To BN7PR15MB2385.namprd15.prod.outlook.com (2603:10b6:406:8c::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 890e9a60-6ff7-4b16-f38a-08d5d79fb790 X-MS-TrafficTypeDiagnostic: BN7PR15MB2385: X-Exchange-Antispam-Report-Test: UriScan:(250305191791016)(22074186197030); X-MS-Exchange-SenderADCheck: 1 X-Forefront-PRVS: 07106EF9B9 Received-SPF: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts) SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2018 17:52:11.3969 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 890e9a60-6ff7-4b16-f38a-08d5d79fb790 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 92e84ceb-fbfd-47ab-be52-080c6b87953f X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR15MB2385 X-OriginatorOrg: ericsson.com X-IsSubscribed: yes X-SW-Source: 2018-06/txt/msg00526.txt.bz2 Hi Maciej, This patch looks good from the GDB side (with one nit in the test below), but somebody from binutils would need to review the bits in opcodes/include. > Index: binutils/gdb/testsuite/gdb.arch/mips-disassembler-options.exp > =================================================================== > --- /dev/null 1970-01-01 00:00:00.000000000 +0000 > +++ binutils/gdb/testsuite/gdb.arch/mips-disassembler-options.exp 2018-06-20 15:58:24.888391112 +0100 > @@ -0,0 +1,58 @@ > +# Copyright 2018 Free Software Foundation, Inc. > + > +# This program is free software; you can redistribute it and/or modify > +# it under the terms of the GNU General Public License as published by > +# the Free Software Foundation; either version 3 of the License, or > +# (at your option) any later version. > +# > +# This program is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +# GNU General Public License for more details. > +# > +# You should have received a copy of the GNU General Public License > +# along with this program. If not, see . > + > +# Test MIPS disassembler options. > + > +if { ![istarget "mips*-*-*"] } then { > + verbose "Skipping MIPS disassembler option tests." > + return > +} > + > +standard_testfile .s > +set objfile [standard_output_file ${testfile}.o] > + > +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {}] \ > + != "" } { > + return > +} > + > +clean_restart ${objfile} > + > +proc mips_disassemble_test { func insn mesg } { > + gdb_test "disassemble $func" \ > + "Dump of assembler code for function\ > + $func:\r\n\[^:\]+:\t$insn\r\nEnd of assembler dump\." \ > + $mesg > +} > + > +# Verify defaults. > +mips_disassemble_test foo "move\tv0,v1" "disassemble default" > + > +# Verify option overrides. > +gdb_test "set disassembler-options gpr-names=numeric" > +mips_disassemble_test foo "move\t\\\$2,\\\$3" "disassemble numeric (gpr-names)" > +# Check multiple options too. > +gdb_test "set disassembler-options msa,reg-names=numeric,reg-names=r3000" > +mips_disassemble_test foo "move\t\\\$2,\\\$3" "disassemble numeric (reg-names)" > + > +# Verify ABI overrides. > +mips_disassemble_test bar "move\t\\\$2,\\\$8" "disassemble ABI (numeric)" > +gdb_test "set disassembler-options" > +gdb_test "set mips abi o32" > +mips_disassemble_test bar "move\tv0,t0" "disassemble ABI (o32)" > +gdb_test "set mips abi n32" > +mips_disassemble_test bar "move\tv0,a4" "disassemble ABI (n32)" > +gdb_test "set mips abi n64" > +mips_disassemble_test bar "move\tv0,a4" "disassemble ABI (n64)" Avoid parenthesis at the end of test names: https://sourceware.org/gdb/wiki/GDBTestcaseCookbook#Do_not_use_.22tail_parentheses.22_on_test_messages Simon