From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27388 invoked by alias); 4 May 2005 20:32:56 -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 27264 invoked from network); 4 May 2005 20:32:49 -0000 Received: from unknown (HELO legolas.inter.net.il) (192.114.186.24) by sourceware.org with SMTP; 4 May 2005 20:32:49 -0000 Received: from zaretski (IGLD-80-230-9-69.inter.net.il [80.230.9.69]) by legolas.inter.net.il (MOS 3.5.6-GR) with ESMTP id EHI21920 (AUTH halo1); Wed, 4 May 2005 23:32:43 +0300 (IDT) Date: Wed, 04 May 2005 20:32:00 -0000 From: "Eli Zaretskii" To: gdb-patches@sources.redhat.com Message-ID: <01c550e8$Blat.v2.4$3ed1d1a0@zahav.net.il> Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=ISO-8859-1 In-reply-to: <20050504180632.GA28488@white> (message from Bob Rossi on Wed, 4 May 2005 14:06:32 -0400) Subject: Re: [RFC] fullname attribute for GDB/MI stack frames Reply-to: Eli Zaretskii References: <01c54f57$Blat.v2.4$4c163500@zahav.net.il> <20050502204859.GA6090@nevyn.them.org> <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> <20050504135122.GA27415@white> <20050504180632.GA28488@white> X-SW-Source: 2005-05/txt/msg00137.txt.bz2 > Date: Wed, 4 May 2005 14:06:32 -0400 > From: Bob Rossi > Cc: gdb-patches@sources.redhat.com > > > > This is very true. This will break CGDB for instance. It use's the > > > fullname as a unique key to a file. If GDB says that c:\abc has 2 > > > breakpoints and \abc has 1, CGDB will have 2 source files the user can > > > choose and each will contain it's own breakpoints. > > > > That's just a bug in CGDB (or at least in its Windows port, if it > > exists): it should use smarter checks for identity of files, like the > > equivalent of the Posix inode test. > > Now that's just a difference of opinion. Well, of course it's a difference of opinion! The question is whose opinion is more correct and based on more experience of dragging Posix programs screaming and kicking into the wonderful world of Microsoft filesystems. More to the point: are you saying that CGDB is comparing file names using strcmp, and if so, are you claiming that the code which does that is ``correct'', including on Windows? My experience tells me that the assumption that file names can be compared as strings is very Posix-centric, and breaks easily on Windows. If you compare file names as strings, you will fail to find that d:/foo and d:\Foo are the same file, for example. You will also fail to find that d:/foo/bar and f:/bar are the same file because f: is a result of the SUBST command. And then there's the case of a network share that is mapped to a drive letter, so \\foo\bar\baz and x:/baz, say, could both point to the same file. I could go on and on like that, but the bottom line is that file names are not strings when you wish to check them for equality. If CGDB does that, it needs to be fixed, at least on Windows. (I'd also fix it on Unix, since even on Unix there are hardlinks that exibit similar issues.) > As it stands now, the doco says that the fullname is absolute, and > therefor, CGDB expects that filename to be a unqiue key. The file names \abc and d:foo _are_ absolute, they are just not ``fully qualified''. These two notions are identical on Unix, but not on Windows. It's a mess that we shouldn't enter without a very good reason, and the one which started this thread is far from that.