From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1126 invoked by alias); 4 May 2005 18:32:47 -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 30550 invoked from network); 4 May 2005 18:31:29 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 4 May 2005 18:31:29 -0000 Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian)) id 1DTOee-00050r-9F; Wed, 04 May 2005 14:31:28 -0400 Date: Wed, 04 May 2005 18:32:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: gdb-patches@sources.redhat.com Subject: Re: [RFC] fullname attribute for GDB/MI stack frames Message-ID: <20050504183127.GA19094@nevyn.them.org> Mail-Followup-To: Eli Zaretskii , gdb-patches@sources.redhat.com References: <20050502195515.GA10429@nevyn.them.org> <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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-SW-Source: 2005-05/txt/msg00130.txt.bz2 On Wed, May 04, 2005 at 02:05:22PM -0400, Eli Zaretskii wrote: > > Date: Wed, 4 May 2005 09:34:37 -0400 > > From: Daniel Jacobowitz > > > > I consider printing "d:foo.c" to be "asking the user to guess". We > > didn't tell them where the file was. > > We did, as well as we could. If we're returning a fullname at all, we've decided where to open the file; we can share that decision with the user/client. > > If GDB has settled on a path, it can fully resolve it and display it to > > the user. For instance, suppose that the best GDB can glean from the > > debug information is "d:foo". That's equivalent to "d:./foo". I > > presume that DJGPP has some concept of "get the current directory on > > drive D". So GDB could print out "d:/some/directory/foo" instead. > > I also presume that there's an equivalent "get current drive" for the > > "\foo" case. > > We could do all that, but (1) it would add more ugly OS-dependent > ifdef's to openp, with no good reason, and (2) for the case in point, This would not be in openp. It would, I think, go to lrealpath in libiberty - which already has Windows-specific bits for this. > i.e., fixing file names recorded in the debug info, there's still no > guarantee that the result will be correct, for the reasons I already > explained here many times. There's never any guarantee anything we read from the debug information will be correct. It could be completely bogus; it could be completely correct, but the file missing from this system. The question is what a front end can expect from GDB. The documentation says it can expect an absolute path, not a semi-absolute path. > > > Then let's do what I suggested: take the value of fullname and see if > > > we can reach the file it names. There's no need for any regexp at > > > all; moreover, even if we agree on some regexp, it is only a fuzzy > > > test, since the fact that the output matches does not yet mean that > > > the output is correct. > > > > Then the value GDB uses will be based on its current directory or > > drive, and the value the testsuite uses will be based on its own > > current directory or drive. I don't think that's an improvement. > > Okay, I give up: I no longer care what you do for the test suite in > this case. Just please, PLEASE, don't change anything in openp or in > xfullpath to ``fix'' this test. Can we leave this at that? No. The pattern that I believe is correct, and I think that Chris Faylor does also, is stricter than what you are willing to make GDB output; so testing for it in the testsuite before we commit to outputting it would be a little inconsistent. I'd like to reach a consensus here. I'm trying not to be antagonistic. You're very worked up about this. Of course, does it matter in practice? Does DJGPP support 'expect'? -- Daniel Jacobowitz CodeSourcery, LLC