From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23872 invoked by alias); 4 Oct 2011 13:45:56 -0000 Received: (qmail 23732 invoked by uid 22791); 4 Oct 2011 13:45:32 -0000 X-Spam-Check-By: sourceware.org Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.83/v0.83-20-g38e4449) with ESMTP; Tue, 04 Oct 2011 13:45:09 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 8CFC42C00DB; Tue, 4 Oct 2011 15:45:06 +0200 (CEST) Date: Tue, 04 Oct 2011 13:45:00 -0000 From: Corinna Vinschen To: gdb-patches@sourceware.org Subject: Re: [RFA] testsuite: Add a test for passing of environment variables to inferior Message-ID: <20111004134506.GB24369@calimero.vinschen.de> Reply-To: gdb-patches@sourceware.org Mail-Followup-To: gdb-patches@sourceware.org References: <006301cc8292$367539b0$a35fad10$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <006301cc8292$367539b0$a35fad10$@muller@ics-cnrs.unistra.fr> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-10/txt/msg00075.txt.bz2 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