From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: tromey@redhat.com, Eli Zaretskii Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] specify arguments to debugee from commandline (second try) Date: Tue, 17 Apr 2001 10:38:00 -0000 Message-id: <3ADC6A5E.14113BD8@cygnus.com> References: <87vgoi58lr.fsf@creche.redhat.com> <20010330005457.A21793@llamedos.org> <20010330163603.A27435@llamedos.org> <20010403013600.B7630@llamedos.org> <87n19uirbk.fsf@creche.redhat.com> <200104060832.EAA17613@indy.delorie.com> <4.2.0.58.20010406182645.00c76e80@ics.u-strasbg.fr> <87y9td6gu4.fsf@creche.redhat.com> X-SW-Source: 2001-04/msg00169.html Tom Tromey wrote: > > >>>>> "Pierre" == Pierre Muller writes: > > >> > Maybe you mean that redirections won't work as expected. > > >> Redirection is one thing I thought about. But anything else that has > >> side effects, such as setting variables or computing expressions, > >> could potentially work differently as well. > > Pierre> File expansion would also occur, no ? > > Pierre> By the way, does this occur to args given by set args ? > Pierre> Probably not, but I am not sure here. > > Yes, file expansion happens when you use `run' in gdb as well. > That's because gdb uses the shell to launch the inferior. > > At least, with native Unix debugging. I don't know how arguments are > handled by embedded targets. > > I personally want --run for my native debugging. So I'm not too > concerned about how embedded targets handle strange cases here. I'd suggest ignoring embedded targets for the moment. Most of them don't even allow command line arguments. If: gdb --XXX ... is made to work for the native case then someone else can fix the embedded case. 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 o I think of --run ... as more for the complete load'n'go case. GDB sets the arguments and fires up the program. Only when the program crashes does GDB start. Any way, if the --??? option is added then, we're one step short of the --run that everyone really wants. Andrew