From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Snyder To: tromey@redhat.com Cc: gdb-patches@sources.redhat.com Subject: Re: RFC: Inferior command line arguments Date: Fri, 28 Sep 2001 11:24:00 -0000 Message-id: <3BB4C04D.22C3DAB5@cygnus.com> References: <87zo7gq7gb.fsf@creche.redhat.com> X-SW-Source: 2001-09/msg00424.html 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"?