Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Setting additional environment variables for gdb

When launching GDB we pass it the same environment as the build environment.
You can add a variable by going to the Properties of the project you are debugging
and choosing "C/C++ Build ->Build Variables"

Note that the environment tab of the launch sets the environment for the program
you are debugging, not for GDB.


> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
> On Behalf Of David Wootton
> Sent: Thursday, November 20, 2014 11:57 AM
> To: cdt-dev@xxxxxxxxxxx
> Subject: [cdt-dev] Setting additional environment variables for gdb
> I have a set of plugins that extend the CDT debugger. I need to set an
> additional environment variable before invoking gdb so gdb can use that
> value. I tried adding it to the environment variable map in the launch
> configuration, but it doesn't get set in gdb's environment. I can see that it is
> in the launch configuration since I can see gdb issue a gdb-set environment
> command for the variable
> I have looked thru CDT Luna source looking for a method in the CDT api that I
> can can, but I haven't found any way to do this.
> Do you have any suggestions how to do this?
> Thanks
> Dave
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit

Back to the top