Message ID | 019eaf5d-9ace-539e-8501-feb3cb0eed6c@vnet.ibm.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 59300 invoked by alias); 18 Nov 2016 16:56:33 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 59278 invoked by uid 89); 18 Nov 2016 16:56:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_SEMBACKSCATTER, SPF_PASS autolearn=ham version=3.3.2 spammy=3616 X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 18 Nov 2016 16:56:23 +0000 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id uAIGrho3075990 for <gdb-patches@sourceware.org>; Fri, 18 Nov 2016 11:56:22 -0500 Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.151]) by mx0a-001b2d01.pphosted.com with ESMTP id 26t2turpqy-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for <gdb-patches@sourceware.org>; Fri, 18 Nov 2016 11:56:22 -0500 Received: from localhost by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for <gdb-patches@sourceware.org> from <bergner@vnet.ibm.com>; Fri, 18 Nov 2016 09:56:20 -0700 Received: from d03dlp01.boulder.ibm.com (9.17.202.177) by e33.co.us.ibm.com (192.168.1.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 18 Nov 2016 09:56:17 -0700 Received: from b03cxnp08025.gho.boulder.ibm.com (b03cxnp08025.gho.boulder.ibm.com [9.17.130.17]) by d03dlp01.boulder.ibm.com (Postfix) with ESMTP id 10B971FF0025; Fri, 18 Nov 2016 09:55:56 -0700 (MST) Received: from b03ledav002.gho.boulder.ibm.com (b03ledav002.gho.boulder.ibm.com [9.17.130.233]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id uAIGuGsL58261672; Fri, 18 Nov 2016 09:56:16 -0700 Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7849113604B; Fri, 18 Nov 2016 09:56:16 -0700 (MST) Received: from otta.local (unknown [9.85.137.83]) by b03ledav002.gho.boulder.ibm.com (Postfix) with ESMTP id 642BC13603C; Fri, 18 Nov 2016 09:56:15 -0700 (MST) Subject: Re: [PATCH 1/2] Add support for setting disassembler-options in GDB for POWER, ARM and S390 To: Eli Zaretskii <eliz@gnu.org> References: <b6037acd-9036-7e69-3350-8da5f0ec981b@vnet.ibm.com> <bdc0c318-4abd-010e-28cf-b654222fe86a@redhat.com> <decc5b05-46eb-2187-5cbd-a7a2a32aaa56@vnet.ibm.com> <83eg28dcjk.fsf@gnu.org> Cc: nickc@redhat.com, gdb-patches@sourceware.org, uweigand@de.ibm.com, palves@redhat.com, amodra@gmail.com, binutils@sourceware.org From: Peter Bergner <bergner@vnet.ibm.com> Date: Fri, 18 Nov 2016 10:56:14 -0600 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: <83eg28dcjk.fsf@gnu.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16111816-0008-0000-0000-0000061CA011 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006099; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000189; SDB=6.00782471; UDB=6.00377584; IPR=6.00559941; BA=6.00004892; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00013369; XFM=3.00000011; UTC=2016-11-18 16:56:18 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16111816-0009-0000-0000-00003D210CEC Message-Id: <019eaf5d-9ace-539e-8501-feb3cb0eed6c@vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-11-18_10:, , 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-1609300000 definitions=main-1611180283 X-IsSubscribed: yes |
Commit Message
Peter Bergner
Nov. 18, 2016, 4:56 p.m. UTC
On 11/18/16 9:37 AM, Eli Zaretskii wrote: >> Cc: gdb-patches@sourceware.org, Ulrich Weigand <uweigand@de.ibm.com>, Pedro Alves <palves@redhat.com>, Alan Modra <amodra@gmail.com>, binutils <binutils@sourceware.org> >> From: Peter Bergner <bergner@vnet.ibm.com> >> Date: Fri, 18 Nov 2016 09:10:38 -0600 >> >> +* New commands >> + >> +set disassembler-options >> +show disassembler-options >> + Controls the passing of target specific information to the disassembler. >> + Only supported on some targets. If it is necessary to specify more than >> + one disassembler option then multiple options can be placed together into >> + a comma separated list. Default is ''. > > Thanks, but I think we should tell what systems support this. Sure, how about the following? Peter
Comments
> Cc: nickc@redhat.com, gdb-patches@sourceware.org, uweigand@de.ibm.com, > palves@redhat.com, amodra@gmail.com, binutils@sourceware.org > From: Peter Bergner <bergner@vnet.ibm.com> > Date: Fri, 18 Nov 2016 10:56:14 -0600 > > > Thanks, but I think we should tell what systems support this. > > Sure, how about the following? Perfect, thanks.
On 11/18/2016 04:56 PM, Peter Bergner wrote: > diff --git a/gdb/NEWS b/gdb/NEWS > index a597405..54a6b7b 100644 > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -36,6 +36,16 @@ > > Synopsys ARC arc*-*-elf32 > > +* New commands > + > +set disassembler-options > +show disassembler-options > + Controls the passing of target specific information to the disassembler. > + If it is necessary to specify more than one disassembler option then > + multiple options can be placed together into a comma separated list. > + Default is ''. Currently the only supported targets are ARM, PowerPC > + and S/390. > + 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. 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" Thanks, Pedro Alves
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? > 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? Peter
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 <https://sourceware.org/gdb/wiki/GDBTestcaseCookbook>, 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
diff --git a/gdb/NEWS b/gdb/NEWS index a597405..54a6b7b 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -36,6 +36,16 @@ Synopsys ARC arc*-*-elf32 +* New commands + +set disassembler-options +show disassembler-options + Controls the passing of target specific information to the disassembler. + If it is necessary to specify more than one disassembler option then + multiple options can be placed together into a comma separated list. + Default is ''. Currently the only supported targets are ARM, PowerPC + and S/390. + *** Changes in GDB 7.12 * GDB and GDBserver now build with a C++ compiler by default.