From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29815 invoked by alias); 21 Oct 2003 19:29:42 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 29786 invoked from network); 21 Oct 2003 19:29:41 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 21 Oct 2003 19:29:41 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id E016A2B89; Tue, 21 Oct 2003 15:29:40 -0400 (EDT) Message-ID: <3F958924.7020906@gnu.org> Date: Tue, 21 Oct 2003 19:29:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Jacobowitz Cc: gdb@sources.redhat.com Subject: Re: GDB's command qualifier character is `/' References: <3F92C0D2.6050807@gnu.org> <20031020003248.GA20365@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-10/txt/msg00243.txt.bz2 > All of the currently accepted / options that I can find are output > format qualifiers. While: /d /f /c are certainly format qualfiers, I don't think repeat counts: /2 /16 ... or size: /b /h /w /g can be interpreted that way. For instance (gdb) x/8 $pc ... (gdb) print/8 main Item count other than 1 is meaningless in "print" command. (gdb) print/g main Size letters are meaningless in "print" command. Note that the current code doesn't separate single letter qualfiers with a `/' ("x/8/f/g" isn't valid). But tweaking the code to do this is easy, and I don't expect users to notice. Also note that GDB's lack of a strong parser means that: x /8 $pc is interpreted as: x/8 $pc > I find nothing strange or inconsistent about using > a different syntax for options and for output qualifiers. GDB doesn't > have any examples of > break /shlib libc.so.6 round > or > break /shlib:libc.so.6 round ``Note that this doesn't address "parameterized qualifiers" (tar/dump convention?) and "qualified parameters" (not allowed?)''. To expand on "tar/dump convention", tar/dump put the parameters after the qualifiers vis: break/shlib libc.so.6 round (it could get confusing if multiple qualfiers required parameters as occures with "tar xbf 1024 -"). So: break/shlib=libc.so.6 round might be better ("=" avoids the shift key needed by ":"). >> (1) Personally, I'm always using the `/' qualifier, but I can't remember >> when, if ever, I used one of the UNIX style command options. > > > That's because there are very few commands in all of GDB's CLI which > _take_ options. /, -, or otherwise. The question to ask isn't how many commands use each syntax, but rather how many users use each syntax. As a user, I use `/..' every day. As a user, I don't think I've ever used `-...' syntax and only know of it because I've looked at the code. Andrew