This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFC: Inferior command line arguments
- To: tromey at redhat dot com
- Subject: Re: RFC: Inferior command line arguments
- From: Michael Snyder <msnyder at cygnus dot com>
- Date: Fri, 28 Sep 2001 11:24:13 -0700
- CC: gdb-patches at sources dot redhat dot com
- Organization: Red Hat
- References: <87zo7gq7gb.fsf@creche.redhat.com>
Tom Tromey wrote:
>
> Tonight I did some hacking to let one set the inferior command line
> arguments from the gdb command line. This feature has been discussed
> at length at least twice (most recently in March-April 2001 on
> gdb-patches). I would like to get some feedback on my general
> approach before I do the polishing.
>
> For the user the feature looks like this:
>
> gdb --args program arg1 arg2 ... argN
>
> Actually, --args can appear anywhere:
>
> gdb program --args arg1 arg2 ... argN
Without having read thru your patch, how are you able to distinguish
between args that are intended for GDB (such as "program" above), and
args that are intended for the inferior? You have "program" appearing
both before and after the "--args" flag. How are you picking it out
as special? How will you pick out other args that are intended for
GDB and not for the inferior, such as "-nw"?