how to pass environment variables to inferior when debugging with gdbserver
Doug Evans
dje@google.com
Tue Sep 15 19:30:00 GMT 2009
On Fri, Sep 4, 2009 at 12:34 AM, Amker.Cheng <amker.cheng@gmail.com> wrote:
> Hi All:
> I want to debug a problem with dynamic linker when setting LD_AUDIT
> variable, apparently this can only be set to inferior,
> or gdbserver itself would break.
> The problem is how to pass this variables to inferior by gdbserver
> command line? I searched the doc but
> didn't found a solution. Maybe I've missed something important, please
> help and correct me if I am wrong.
> Thanks.
> --
> Best Regards.
>
With cvs head gdb (and in 7.0 when it is released) there is a new
--wrapper argument to gdbserver.
E.g.
$ gdbserver --wrapper env LD_AUDIT=mumble -- :2222 ./testprog
More information about the Gdb
mailing list