From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24599 invoked by alias); 20 Apr 2011 11:56:09 -0000 Received: (qmail 24537 invoked by uid 22791); 20 Apr 2011 11:55:47 -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; Wed, 20 Apr 2011 11:55:31 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 09C922C0254; Wed, 20 Apr 2011 13:55:29 +0200 (CEST) Date: Wed, 20 Apr 2011 11:56:00 -0000 From: Corinna Vinschen To: gdb-patches@sourceware.org Subject: Re: [RFC] Add support for locally modified environment variables for windows-nat.c Message-ID: <20110420115528.GA5842@calimero.vinschen.de> Reply-To: gdb-patches@sourceware.org Mail-Followup-To: gdb-patches@sourceware.org References: <000601cbff45$66fa5820$34ef0860$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <000601cbff45$66fa5820$34ef0860$@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-04/txt/msg00349.txt.bz2 On Apr 20 12:26, Pierre Muller wrote: > A while ago > Sebastian Puebla submitted a patch for > support of locally modified environment variables. > > http://sourceware.org/ml/gdb-patches/2010-05/msg00317.html > http://sourceware.org/ml/gdb-patches/2010-08/msg00026.html > http://sourceware.org/ml/gdb-patches/2010-11/msg00128.html > > Nevertheless, I suspect that his patch would not have worked for Cygwin, > because Cygwin converts several environment variables > from windows style to POSIX style. Do you suspect or did you actually test it? What you're trying to accomplish is actually the task of the cygwin_internal (CW_SYNC_WINENV); call right before calling CreateProcess. This allows to keep the actual underlying details of the environment handling entirely in the hands of Cygwin. Especially copying an internal list of env vars from Cygwin into GDB makes me very uncomfortable since this is bound to break as soon as we decide to handle things a bit different in Cygwin. Of course it's cgf's call, but I don't think this is the right thing to do. If this is actually broken, it's the cygwin_internal(CW_SYNC_WINENV) implementation in Cygwin which should be fixed, rather than GDB going out of its way to emulate what happens in Cygwin internally. Corinna -- Corinna Vinschen Cygwin Project Co-Leader Red Hat