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 07:24:47AM +0300, Eli Zaretskii wrote:
> > Date: Tue, 3 May 2005 17:39:11 -0400
> > From: Christopher Faylor <me@cgf.cx>
> > 
> > Cygwin has realpath and Windows has an equivalent function.  AFAIK, it
> > will correctly translate \abc to x:\abc.
> 
> No, it will _incorrectly_ translate them: the current drive and
> directory that are in effect when we call these functions are _not_
> what they were when the compiler compiled the source and recorded its
> file name in the debug info.

Eli, this is inconsistent with the rest of the world.  In the rest of
the world, realpath() and canonicalize_file_name() call getcwd() (or
the operating system's equivalent function).  Can you explain to us why
it is correct for other OSes to do this resolution in xfullpath (or
wherever else), and for DJGPP not to?

> > Anyway, it seems like the mingw port should be using GetFullPathName()
> > in gdb_realpath().
> 
> I don't see this in my sandbox.

It doesn't.  It should.  More precisely, gdb_realpath should be removed
and replaced with libiberty's lrealpath().  I was under the impression
that I had done this when I added the function to libiberty, but
obviously I forgot.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


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