From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23464 invoked by alias); 25 Jul 2002 23:23:54 -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 23445 invoked from network); 25 Jul 2002 23:23:52 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 25 Jul 2002 23:23:52 -0000 Received: from ges.redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 600C03EB7; Thu, 25 Jul 2002 19:23:51 -0400 (EDT) Message-ID: <3D408887.70003@ges.redhat.com> Date: Thu, 25 Jul 2002 16:23:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020708 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Anthony Green Cc: gdb@sources.redhat.com Subject: Re: naming command arguments References: <1027556059.2082.179.camel@dhcppc2> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-07/txt/msg00274.txt.bz2 > I've been talking to some GDB users who are frustrated with some of > GDB's command syntax. My understanding is that optional command > arguments must be the last possible arguments, and they get dropped off > right to left. The problem is that some GDB commands have multiple > arguments, all of which make sense to be optional, but in no particular > order. > > So, for instance, the restore command looks something like: > > restore FILENAME [OFFSET [START [STOP]]] > > In this case, if you only want to specify the START argument, your > forced to give OFFSET argument. > > They're suggestion, which seems to make sense to me, is to introduce the > concept of named parameters for GDB commands. So, in my previous > example, they could simply write... > > restore FILENAME start:VALUE > > ...and let GDB make reasonable assumptions about OFFSET and STOP > > How do people feel about introducing these kinds of arguments to certain > GDB commands (like restore)? For this specific case, how does one differentiate between: start:1 the source and line specification and: start:1 the start:VALUE? GDB desperatly needs a command line syntax that better allows the specification of optional information but it needs to be chosen very carefully. Other options to consider: restore/start:VALUE FILE restore --start=VALUE FILE etc. Andrew