This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH] specify arguments to debugee from commandline (second try)
>>>>> "Pierre" == Pierre Muller <firstname.lastname@example.org> 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.
One idea would be for gdb to have a way to set a vector of arguments
in addition to a string of arguments. Then the target could decide
what to do with the vector: quote it for the shell in Unix, do
whatever is right for DOS (I don't know), or just pass them to the
remote (?) for embedded targets. That would push quoting decisions to
the target, where they presumably belong.