This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: how to pass environment variables to inferior when debugging with gdbserver
- From: Doug Evans <dje at google dot com>
- To: "Amker.Cheng" <amker dot cheng at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Tue, 15 Sep 2009 12:29:56 -0700
- Subject: Re: how to pass environment variables to inferior when debugging with gdbserver
- References: <e8b251c80909040034y19ae2f76o33d3d99e46125479@mail.gmail.com>
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