This is the mail archive of the gdb-patches@sourceware.org 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: [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


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