This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC] fullname attribute for GDB/MI stack frames
On Tue, May 03, 2005 at 05:39:11PM -0400, Christopher Faylor wrote:
> On Wed, May 04, 2005 at 12:12:48AM +0300, Eli Zaretskii wrote:
> >> Date: Tue, 3 May 2005 15:56:50 -0400
> >> From: Bob Rossi
> >> Does anyone know what xfullpath would do if d:foo or \abc was passed to
> >> it?
> >
> >I already answered that in this thread: it will leave \abc intact, and
> >d:foo will be converted into d:./foo. (On Windows, that is, and
> >assuming that there's no realpath or canonicalize_file_name in MinGW.)
> >So xfullpath does not change anything with these cases on Windows (and
> >can't, since the necessary information is missing).
>
> Cygwin has realpath and Windows has an equivalent function. AFAIK, it
> will correctly translate \abc to x:\abc. I don't know what it will do
> with d:foo. NT+ shells treat that as "the current directory on drive
> d:" but that's just something that is special to a shell. Probably it
> should be resolved as "d:\foo". Hopefully the Windows routine for
> producing absolute paths will do something sensical.
>
> Anyway, it seems like the mingw port should be using GetFullPathName()
> in gdb_realpath().
libiberty/lbasename.h:
/* cygwin has realpath, so it won't get here. */
# if defined (_WIN32)
# define WIN32_LEAN_AND_MEAN
# include <windows.h> /* for GetFullPathName */
# endif
So we call Cygwin's realpath or Window's GetFullPathName if we fall
through to the lrealpath call.
I don't know any of this affects DJGPP...
--
Daniel Jacobowitz
CodeSourcery, LLC