Community
Participate
Working Groups
Build Identifier: 3.5.2 When using gdb 7.1 (MINGW) (and 7.0 too), when I set an environment variable, it is set by the "set environment VAR VALUE" command but because of a gdb bug the process does not receive the new variable. This causes the debug session to fail if path to required DLLs are set in the process environment (i.e. on the environment tab). This seems to be a gdb bug (http://sourceforge.net/tracker/?func=detail&atid=102435&aid=2994861&group_id=2435) but somehow it should be worked around in CDT too. Reproducible: Always Steps to Reproduce: - Make sure you are using gdb 7.x - Create a small C project using: #include <stdio.h> #include <stdlib.h> int main() { printf("TEST = %s\n", getenv("TEST")); return 0; } Create a lauch configuration and set the TEST environement variable on the Environment tab to "HELLOWORLD" Run the program. It will display correctly TEST=HELLOWORLD Now debug with the same configuration. It will print TEST=(null)
Another reference to this GDB problem http://sourceware.org/ml/gdb-patches/2010-05/msg00317.html
This is a GDB bug: http://sourceware.org/bugzilla/show_bug.cgi?id=10989 Patch was posted here http://sourceware.org/ml/gdb-patches/2010-05/msg00317.html and again here http://sourceware.org/ml/gdb-patches/2010-08/msg00026.html