From: Andrew Cagney <ac131313@cygnus.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: Tom Tromey <tromey@redhat.com>,
Michael Snyder <msnyder@cygnus.com>,
gdb-patches@sources.redhat.com
Subject: Re: RFC: Inferior command line arguments
Date: Fri, 28 Sep 2001 12:27:00 -0000 [thread overview]
Message-ID: <3BB4CF12.3020900@cygnus.com> (raw)
In-Reply-To: <20010928145938.A13638@nevyn.them.org>
> On Fri, Sep 28, 2001 at 12:43:24PM -0600, Tom Tromey wrote:
> Rather than continue down this path, I'd much rather see us fix or fork
> GNU getopt so that we can detect the presence of '--'; I'd think in
> fact we could do it without having to go through all these hoops, but I
> haven't actually looked at the code. If nothing else, this should be
> possible:
>
> - scan the command line for '--'
> - if found, save what's after as an inferior argv vector
> - shrink argv so it stops before the '--'
> - go through normal existing getopt loop
> and optionally:
> - if we found a program name, tack it on at the beginning of the
> inferior argv; if we didn't, grab one from the beginning of the
> inferior argv.
>
> The use of -- is pretty standard; I'd like us to support it if we
> could.
Unfortunatly ``--'' already has certain semantics. Detecting it
wouldn't be sufficient. Consider things like:
--argument-expected --
-- --poor-programe-name-choice --poor-core-file-choice
gdb --args -- gdb --args -- program arg arg
Tom's --args -- is somewhat grotesque but at least it is well defined.
Something like:
gdb --- gdb --- program arg arg
might be possible but it is really sugar for ``--args --''.
Andrew
next prev parent reply other threads:[~2001-09-28 12:27 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-27 21:02 Tom Tromey
2001-09-28 1:31 ` Eli Zaretskii
2001-09-28 5:26 ` Tom Tromey
2001-09-28 7:21 ` Eli Zaretskii
2001-09-28 7:50 ` Tom Tromey
2001-09-28 9:25 ` Eli Zaretskii
2001-09-30 12:07 ` Christopher Faylor
2001-10-01 0:39 ` Eli Zaretskii
2001-10-01 8:07 ` Tom Tromey
2001-10-01 8:10 ` Christopher Faylor
2001-09-28 11:24 ` Michael Snyder
2001-09-28 11:32 ` Tom Tromey
2001-09-28 11:59 ` Daniel Jacobowitz
2001-09-28 12:24 ` Tom Tromey
2001-09-29 2:23 ` Eli Zaretskii
2001-09-28 12:27 ` Andrew Cagney [this message]
2001-09-28 12:42 ` Daniel Jacobowitz
2001-09-28 14:19 ` Tom Tromey
2001-09-28 14:22 ` Daniel Jacobowitz
2001-09-29 1:23 ` David Deephanphongs
2001-10-01 8:09 ` Tom Tromey
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=3BB4CF12.3020900@cygnus.com \
--to=ac131313@cygnus.com \
--cc=drow@mvista.com \
--cc=gdb-patches@sources.redhat.com \
--cc=msnyder@cygnus.com \
--cc=tromey@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