This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] specify arguments to debugee from commandline (second try)
Thus spake Andrew Cagney (ac131313@cygnus.com):
> Anyway, I think people have generally agreed that being to type:
> $ foo bar boof woftam
> $ gdb --??? !$
>
> is preferable to:
>
> $ gdb --args=`something goes here`
>
> It is a case of user convenience winning over correctness.
>
> The next question is to do with the exact arg name. I've several
> comments:
>
> o xterm uses -e program arguments
>
I've actually discovered a compatability problem with the way I was
planning on (re)implementing this (using '--' as the "all following
arguments go to inferior" switch). Someone could use '--' to
escape a wierd core file:
gdb progname -- -e
(where -e is the core file.)
I'm going to (re)implement the arg. patch with a -e like interface..
Mind you, -e is taken already (it's equivalent to --exec).
I tend to favor --args, myself, so unless there are any objections...
gdb <opts...> progname --args <inf_args...>
Dave
--
"*Veni, vici*...Vetinari."
-- (Terry Pratchett, Jingo)