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


> Date: Wed, 4 May 2005 09:45:38 -0400
> From: Daniel Jacobowitz <drow@false.org>
> Cc: gdb-patches@sources.redhat.com
> 
> > 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?

We are again talking past each other.  What you describe is correct
for all platforms, including DJGPP and Windows, but not in the
specific circumstances which led us to this endless thread, which is
to find a fully qualified file name using the information recorded in
the debug info.

The primary use of realpath and its ilk is when we need to take apart
the absolute file name, or see if two file names belong to the same
directory, or some other similar test.  In these cases, we know that
cwd is the same for both file names, and making file names absolute
simplifies the rest of the code in these cases.  But that is not our
situation.


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