RFC: Inferior command line arguments

Michael Snyder msnyder@cygnus.com
Fri Sep 28 11:24:00 GMT 2001


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"?



More information about the Gdb-patches mailing list