From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32744 invoked by alias); 5 May 2005 04:02:12 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 32553 invoked from network); 5 May 2005 04:01:57 -0000 Received: from unknown (HELO romy.inter.net.il) (192.114.186.66) by sourceware.org with SMTP; 5 May 2005 04:01:57 -0000 Received: from zaretski (IGLD-83-130-245-224.inter.net.il [83.130.245.224]) by romy.inter.net.il (MOS 3.5.6-GR) with ESMTP id BDK55558 (AUTH halo1); Thu, 5 May 2005 07:01:55 +0300 (IDT) Date: Thu, 05 May 2005 04:02:00 -0000 From: "Eli Zaretskii" To: gdb-patches@sources.redhat.com Message-ID: <01c55126$Blat.v2.4$fe7ae080@zahav.net.il> Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=ISO-8859-1 In-reply-to: <20050504234035.GM30075@trixie.casa.cgf.cx> (message from Christopher Faylor on Wed, 4 May 2005 19:40:35 -0400) Subject: Re: [RFC] fullname attribute for GDB/MI stack frames Reply-to: Eli Zaretskii References: <01c54f91$Blat.v2.4$f6e0b160@zahav.net.il> <20050503034604.GA437@nevyn.them.org> <01c55017$Blat.v2.4$3cb51f20@zahav.net.il> <20050503194856.GA4477@nevyn.them.org> <01c55021$Blat.v2.4$520aa7a0@zahav.net.il> <20050504133437.GA10578@nevyn.them.org> <20050504183127.GA19094@nevyn.them.org> <01c550eb$Blat.v2.4$24b1dce0@zahav.net.il> <20050504210717.GA2419@nevyn.them.org> <20050504234035.GM30075@trixie.casa.cgf.cx> X-SW-Source: 2005-05/txt/msg00154.txt.bz2 > Date: Wed, 4 May 2005 19:40:35 -0400 > From: Christopher Faylor > > On Wed, May 04, 2005 at 05:07:17PM -0400, Daniel Jacobowitz wrote: > >If it's going to open files, it _does_ matter. You said that the > >current directory (and presumably the current drive) are global on this > >platform. But the current directory is not stable across time. If the > >front end changes the current directory after talking to GDB, suddenly > >it won't be able to open files. > > Right. Presumably, on windows 9x you could do something like: > > (gdb) shell > d: > cd \foo > exit > > and end up invalidating anything which was previously pointing to > d:foo. It would be a bug if this happened. That is why we have this fragment in cli-cmds.c:shell_escape: #ifdef GLOBAL_CURDIR /* Make sure to return to the directory GDB thinks it is, in case the shell command we just ran changed it. */ chdir (current_directory); #endif The DJGPP's version of chdir changes the drive as well as the directory if its argument mentions a drive different from the current one. (It looks like GLOBAL_CURDIR is defined on defs.h only for the DJGPP port, so I think perhaps the MinGW port should do that as well.)