This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFC: Inferior command line arguments
Thus spake Tom Tromey (tromey@redhat.com):
>
> I'm not really a fan of `---'. It doesn't seem visible enough.
>
> I might be able to make `--args' end argument processing. Then you
> would write:
>
> gdb --args gdb -nw
>
Have you seen my patch? getopt only reorders the arguments that
it has already processed. So, if you detect --args, and break out
of the argument-processing loop, argv[optind] is equal to the
target name, and argv[optind+1] ... argv[argc-1] are the
target's arguments.
How are you handling the fact that you don't know what the target
is until far later in the code?
Dave
--
"The knuckles! The horrible knuckles!"
-- (Terry Pratchett, The Light Fantastic)