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

Tom Tromey tromey@redhat.com
Fri Apr 6 11:00:00 GMT 2001


>>>>> "Pierre" == Pierre Muller <muller@cerbere.u-strasbg.fr> 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.

Tom



More information about the Gdb-patches mailing list