From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22912 invoked by alias); 12 Nov 2002 01:15:36 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 22904 invoked from network); 12 Nov 2002 01:15:35 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 12 Nov 2002 01:15:35 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id gAC0L8w21749 for ; Mon, 11 Nov 2002 19:21:08 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id gAC0iBD12211; Mon, 11 Nov 2002 19:44:11 -0500 Received: from localhost.redhat.com (romulus-int.sfbay.redhat.com [172.16.27.46]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id gAC0i9q10350; Mon, 11 Nov 2002 19:44:10 -0500 Received: by localhost.redhat.com (Postfix, from userid 469) id 711DFFF79; Mon, 11 Nov 2002 19:40:00 -0500 (EST) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15824.19936.296672.828391@localhost.redhat.com> Date: Mon, 11 Nov 2002 17:15:00 -0000 To: "J. Johnston" Cc: gdb-patches@sources.redhat.com Subject: Re: RFA: gdb/783 doc change In-Reply-To: <3DD03C0D.7A22A286@redhat.com> References: <3DD03C0D.7A22A286@redhat.com> X-SW-Source: 2002-11/txt/msg00312.txt.bz2 J. Johnston writes: > The following changes the mi documentation to clarify the usage of the > "--" delimeter. This delimeter is meant to provide a way to separate > options from parameters so as to handle cases whereby the parameters may > start with "-" and be mistaken for options. > > The problem reported tries to use it generally before any parameter list. > This doesn't work because only the mi_getopt option processor knows to ignore it and > commands that don't have options (preceded by dash) don't call mi_getopt. > It is then treated as a parameter which is incorrect. > > I have removed the delimeter from the description of the -data-disassemble > command as it is not manditory and the delimeter should be treated as optional to all > applicable commands that support both options and parameters. I have removed > it from one of the -data-disassemble examples to clarify that it may or may not > be specified. > > Ok to commit? > Hmmm, the current documentation specifies that a command is: mi-command ==> [ token ] "-" operation ( " " option )* [ " --" ] ( " " parameter )* nl I.e. the -- bit is optional. Doesn't this take already care of the PR? The PR was filed againt 5.2.1. So the doco was updated in between then and now. Maybe I am misreading the PR, though. You cannot remove '--' from the data-disasssemble doco because the command really uses it. The generic doco change seems ok. I'll let Eli comment. Elena > -- Jeff J. > > gdb/mi/ChangeLog: > > 2002-11-11 Jeff Johnston > > * gdbmi.texinfo (GDB/MI Output Syntax): Clarify the usage of the > optional "--" delimeter. > (-data-disassemble): Remove "--" from command synopsis. Also > change one example to not use "--". This is a fix for PR gdb/783.Index: gdbmi.texinfo > =================================================================== > RCS file: /cvs/src/src/gdb/mi/gdbmi.texinfo,v > retrieving revision 1.30 > diff -u -r1.30 gdbmi.texinfo > --- gdbmi.texinfo 11 Nov 2002 17:09:50 -0000 1.30 > +++ gdbmi.texinfo 11 Nov 2002 23:19:50 -0000 > @@ -185,11 +185,15 @@ > finishes. > > @item > -Some @sc{mi} commands accept optional arguments as part of the parameter > -list. Each option is identified by a leading @samp{-} (dash) and may be > -followed by an optional argument parameter. Options occur first in the > -parameter list and can be delimited from normal parameters using > -@samp{--} (this is useful when some parameters begin with a dash). > +Some @sc{mi} commands accept both options and parameters; > +options occur first, followed by parameters. Since options > +always start with a @samp{-} (dash), > +the special @samp{--} delimeter is provided to optionally > +signal the end of the option list. This would be used in the case > +where a parameter needed to start with @samp{-}. > +For @sc{mi} commands that accept no arguments or that > +require parameters but not options, the @samp{--} sequence should > +not be used. > @end itemize > > Pragmatics: > @@ -1093,7 +1097,7 @@ > -data-disassemble > [ -s @var{start-addr} -e @var{end-addr} ] > | [ -f @var{filename} -l @var{linenum} [ -n @var{lines} ] ] > - -- @var{mode} > + @var{mode} > @end example > > @noindent > @@ -1166,7 +1170,7 @@ > @code{main}. > > @smallexample > --data-disassemble -f basics.c -l 32 -- 0 > +-data-disassemble -f basics.c -l 32 0 > ^done,asm_insns=[ > @{address="0x000107bc",func-name="main",offset="0", > inst="save %sp, -112, %sp"@},