This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [PATCH] specify arguments to debugee from commandline (second try)

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

	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.	


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]