This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] OpenCL datatypes test fixes
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: ken at linux dot vnet dot ibm dot com (Ken Werner)
- Cc: schwab at redhat dot com (Andreas Schwab), jan dot kratochvil at redhat dot com (Jan Kratochvil), gdb-patches at sourceware dot org
- Date: Wed, 16 Feb 2011 14:09:54 +0100 (CET)
- Subject: Re: [patch] OpenCL datatypes test fixes
Ken Werner wrote:
> On Wednesday, February 16, 2011 11:24:21 am Andreas Schwab wrote:
> > Ken Werner <ken@linux.vnet.ibm.com> writes:
> > > On Tuesday, February 15, 2011 10:01:55 pm Ulrich Weigand wrote:
> >
> > This passes because "char \\\[2\\\]" matches (a substring of) the first
> > output, but you really want to match the whole string "type = char [2]".
> >
> > +gdb_test "whatis c2" "type = char(2| \\\[2\\\])"
>
> Does this also mean:
> gdb_test "whatis c2" "type = .*(char(2| \\\[2\\\]))"
> as suggested by Jan?
No, the implicit ".*" is only at the *beginning* of the match string,
not somewhere in the middle, so that
gdb_test "whatis c2" "type = char(2| \\\[2\\\])"
is equivalent to
gdb_test "whatis c2" ".*type = char(2| \\\[2\\\])"
which is equivalent to
gdb_test "whatis c2" "(.*type = char2|.*type = char \\\[2\\\])"
if you prefer ...
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com