From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 121819 invoked by alias); 22 Nov 2016 17:40: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 121791 invoked by uid 89); 22 Nov 2016 17:40:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Organization, Ones, Hx-languages-length:1684, organization 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; Tue, 22 Nov 2016 17:40:13 +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 E054F6DD8C; Tue, 22 Nov 2016 17:40:11 +0000 (UTC) Received: from [127.0.0.1] (ovpn03.gateway.prod.ext.phx2.redhat.com [10.5.9.3]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uAMHe4Pp019537; Tue, 22 Nov 2016 12:40:04 -0500 Subject: Re: [PATCH 1/2] Add support for setting disassembler-options in GDB for POWER, ARM and S390 To: Peter Bergner References: <83eg28dcjk.fsf@gnu.org> <019eaf5d-9ace-539e-8501-feb3cb0eed6c@vnet.ibm.com> <3ced8e70-af98-12cc-9ee0-41dc46029abc@vnet.ibm.com> Cc: Eli Zaretskii , nickc@redhat.com, gdb-patches@sourceware.org, uweigand@de.ibm.com, amodra@gmail.com, binutils@sourceware.org From: Pedro Alves Message-ID: <833d0a5c-fa02-59d1-96ec-65c43bb5f836@redhat.com> Date: Tue, 22 Nov 2016 17:40:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <3ced8e70-af98-12cc-9ee0-41dc46029abc@vnet.ibm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-11/txt/msg00644.txt.bz2 On 11/22/2016 05:04 PM, Peter Bergner wrote: > On 11/18/16 11:23 AM, Pedro Alves wrote: >> On 11/18/2016 04:56 PM, Peter Bergner wrote: >> This will need a change to the GDB manual as well. It'd probably >> be a good idea to refer to the -M/--disassembler-options section >> of the binutils/disassembler manual for the architecture specific >> options. > > I don't know the manual at all. Can you point me to the spot > you'd like the documentation inserted at? Between the documentation of "disassemble" and "set disassembly-flavor", perhaps? > > >> It'll be good to include an arch-independent gdb test to make sure >> that "set disassembler-options" on other architectures doesn't >> crash and cover some corner cases. E.g., test at least both: >> >> "set disassembler-options" >> "set disassembler-options non-existing-option" > > Is there an example of an arch independent gdb test case I can > use as a skeleton? Most tests are arch independent. Ones that aren't will have some istarget check. Tests in gdb.arch/ are examples. See "Testsuite Organization" in testsuite/README. See also , though for the suggestion above, you don't even need to compile a program and run to main. The suggestion would basically be translated to something like: gdb_exit gdb_start # Using gdb_test_no_output assuming these (should) produce no output. gdb_test_no_output "set disassembler-options" gdb_test_no_output "show disassembler-options" gdb_test "set disassembler-options non-existing-option" "whatever gdb says" Thanks, Pedro Alves