Re: [RFC] Trying to fix testsuite/gdb.arch/i386-sse.exp pattern problem

Daniel Jacobowitz
2007-11-07T15:11:27Z

On Wed, Nov 07, 2007 at 03:37:45PM +0100, Pierre Muller wrote:
> Even this simple test fails:
>
> gdb_test "print {0, 0, 0, 0}" ".* =) \\{(0, ){3}(0\\}.*" "test array"
>
> I am really wondering if this pattern repetition
> is working at all...

Perhaps TCL relies on the system regular expression library, and
Cygwin's does not support repetition operators? Anyway, the TCL
manual says they are supported, so I'm surprised by this. Maybe Chris
Faylor knows something about it.

> I could correct the test, by putting explicitly the
> 16 patterns, which results in an horribly lengthy pattern,
> but I was unable to break it into pieces to have shorter source lines.
>
> Any ideas on ways to split the pattern string sent to gdb_test
> over multiple lines are most welcomed.

I'd use variables.

set item "-?\[0-9\]+, "
set items "$item$item$item$item$item$item$item$item"
append items "$item$item$item$item$item$item$item-?\[0-9\]+"

and that's 16.

--
Daniel Jacobowitz
CodeSourcery