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 Tue, May 03, 2005 at 06:26:47PM -0400, Christopher Faylor wrote:
> On Tue, May 03, 2005 at 06:24:01PM -0400, Daniel Jacobowitz wrote:
> >On Tue, May 03, 2005 at 05:39:11PM -0400, Christopher Faylor wrote:
> >> 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...
> 
> Ah.  Sorry.  I didn't dig far enough.
> 
> So, I guess I don't understand Eli's comments, then.

I begin to make up a patch, and realized that the issue below needs to be
resolved before anything can be done.

Basically, Eli believes it is possible for GDB to return in the fullname
field, a file name that is not absolute. Two examples were \abc or
d:foo. He also mentioned that he might have once even seen a relative path. 
   http://sources.redhat.com/ml/gdb-patches/2005-05/msg00091.html

If what Eli believes is true (a point which I think is not worth debating, 
it could go either depending on the input to GDB), then there is 2 philosophies 
the testsuite can take to validating the fullname: 

   - Use .* as a regex and say anthing goes
   - Use a regex that represents absolute paths. When this breaks, fix 
     the fullname machinery.

Does anyone have an opinion on what is a better approach? My humble
opinion is to say that fullname should be an absolute path. If there is
a valid argument for why it is impossible to get an absolute path from a
fullname, then the first approach must be taken.

Thanks,
Bob Rossi


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