This is the mail archive of the gdb@sourceware.org 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]
Other format: [Raw text]

Re: how to pass environment variables to inferior when debugging with gdbserver


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


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