This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: fullname syntax variable for testsuite
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Thu, 5 May 2005 13:39:42 -0400
- Subject: Re: fullname syntax variable for testsuite
- References: <20050505173202.GC31758@white>
On Thu, May 05, 2005 at 01:32:02PM -0400, Bob Rossi wrote:
> Hi all,
>
> Hopefully this should make everyone happy. If the regex is slightly
> incorrect, after this patch, it should be simple to modify it and have
> the testsuite pick up on those changes.
>
> As you will notice, the initial regex that Eli posted does not match the
> case d:foo. If it is desired to match this case up front, I can do that.
> Otherwise, it's noted in the comment, and can be changed when we run
> into the problem.
For Windows, don't you want the more specific version Chris posted?
[a-zA-Z]:\\.*\|\\\\[^\\][^\\]*\\[^\\].*
Also, while I don't want to quibble about the regex more than necessary
right now, it should match the final slash in the path. Either /.*/ or
\.*\ as the case may be.
> +# The variable fullname_syntax is a regexp which matches what GDB considers
> +# an absolute path. It is currently debatable if the windows style paths
> +# d:foo and \abc should be considered valid as an absolute path.
> +# This regex matches \abc but not d:foo.
> +global fullname_syntax
> +if ![info exists fullname_syntax] then {
> + set fullname_syntax "(\[A-z\]:)?\[/\\\\\].*"
> +}
Don't bother with the 'info exists' unless there's some need for it
that I'm missing. Please capitalize Windows.
--
Daniel Jacobowitz
CodeSourcery, LLC