[RFA] testsuite: Add a test for passing of environment variables to inferior
Corinna Vinschen
vinschen@redhat.com
Tue Oct 4 13:45:00 GMT 2011
On Oct 4 14:36, Pierre Muller wrote:
> Following Eli's comment that it was not clear
> what I wanted to achieve, I wrote a new test.
>
> Manually checking CVS GDB for mingw, Eli's patch
> gives the correct output.
> But Stock Cygwin GDB currently passes none of these
> TEST_GDB_XXX variables to inferior.
> Even the patch that I sent earlier is not correct:
> it still fails for the last test,
> once TEST_GDB_VAR1 has been set into GDB environment list,
> it doesn't get removed on the last start of the inferior...
>
> Corinna, I think this is the reason why I wanted to restore
> the original environment layout (to avoid leaving unset
> variables around.)
Yes, that would be necessary. I'm wondering if we can't just utilze the
global environ variable for this and spare us all the hassle. Something
along these lines:
char **old_env = environ;
environ = in_env;
cygwin_internal (CW_SYNC_WINENV);
CreateProcessW (NULL environment pointer);
environ = old_env;
> Anyhow, one more test in the testsuite to test
> an unchecked feature is always a good thing, no?
No doubt.
Corinna
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat
More information about the Gdb-patches
mailing list