Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@ges.redhat.com>
To: Anthony Green <green@redhat.com>
Cc: gdb@sources.redhat.com
Subject: Re: naming command arguments
Date: Thu, 25 Jul 2002 16:23:00 -0000	[thread overview]
Message-ID: <3D408887.70003@ges.redhat.com> (raw)
In-Reply-To: <1027556059.2082.179.camel@dhcppc2>

> 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



  reply	other threads:[~2002-07-25 23:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-24 17:14 Anthony Green
2002-07-25 16:23 ` Andrew Cagney [this message]
2002-07-25 17:48   ` Anthony Green
2002-07-26 15:02   ` Michael Snyder
2002-07-29  8:41     ` Andrew Cagney
2002-07-29  8:45       ` Daniel Jacobowitz
2002-07-30 20:32         ` Andrew Cagney
2002-07-30 17:43 ` Fernando Nasser
2002-08-03 21:31   ` Anthony Green

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D408887.70003@ges.redhat.com \
    --to=ac131313@ges.redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=green@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox