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


> -----Original Message-----
> 
> > > Like Dennis noted, it could be possible that the fullname 
> might not 
> > > start with a "/". I originally posted the patch with the fullname 
> > > starting with a "/", and since then, there hasn't been any 
> > > complaints. If there is a better regex that ensures that the 
> > > fullname is absolute I'd be happy to change the 
> mi-file.exp test to 
> > > it.
> > 
> > The proper regexp should be something like
> > 
> >    \([A-z]:\)?[/\\].*basics.c
> > 
> > This assumes that \(...\) is the proper syntax for grouping 
> (I don't 
> > know much about the regexp syntax expected by Expect).
> > 
> > (The uppercase A but lowercase z in the above are 
> intentional: that's 
> > because letters between Z and a can also be drive letters, amazingly
> > enough.)
> 
> OK, I don't know why no one has ever posted to this list with 
> testsuite failures on the mi-file.exp testcase. Maybe no one 
> runs the mi testsuite 
> on windows?

I tried.  Many failures, unrelated to fullname, led me to
believe that configuration was not considered as supported
by the mi testsuite.

Also, in my tests at least, the fullname paths from stack frames
all come back as /cygdrive/<drive_letter>/..., so the simplistic
regex would suffice.

> Either way, I'm going to submit a patch later today which 
> will add a variable to mi-support.exp similar to 
> mi_gdb_prompt. The variable will describe the syntax of a 
> fullname field. It will abstract the details 
> and complications from new users trying to write testcase's.
> 
> I'll try to find time to make this quick change tonight. If 
> people don't like this idea, let me know.

This is a good idea, but as the complexity of the regex
increases it becomes more compelling to do an exact check.
Calculate what the absolute path to the source file should
be and compare that with the fullname attribute.  However,
I'm not volunteering to do that.  ;)  It's easy to overblow
the testing for what amounts to a five line code change.

--Dennis


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