This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] fullname attribute for GDB/MI stack frames


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 <drow@false.org>
> > 
> > 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]