This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: -var-create testsuite updates [PATCH]
- From: Nick Roberts <nickrob at snap dot net dot nz>
- To: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- Cc: drow at false dot org (Daniel Jacobowitz), gdb-patches at sourceware dot org
- Date: Fri, 9 Mar 2007 14:41:39 +1300
- Subject: Re: -var-create testsuite updates [PATCH]
- References: <17876.51347.325984.284231@kahikatea.snap.net.nz> <200703090100.l29106BM024625@d12av02.megacenter.de.ibm.com>
> >! mi_gdb_test "-var-create lpcharacter * lpcharacter" \
> >! "\\^done,name=\"lpcharacter\",numchild=\"1\",value=\"$hex \\\\\".*\\\\\"\",type=\"char \\*\"" \
> >! "create local variable lpcharacter"
>
> I'm not completely sure what the somewhat complex regular expression after "value"
> is supposed to test, but it fails on SPU. I get:
>
> -var-create lpcharacter * lpcharacter^M
> ^done,name="lpcharacter",numchild="1",value="0x0",type="char *"^M
> (gdb) ^M
> FAIL: gdb.mi/mi-var-cmd.exp: create local variable lpcharacter
>
> Is this a testcase problem, or is there really something going wrong?
The test is wrong. It looks like SPU initialises locals to 0.
> (B.t.w. the same problem occurs also in mi2-var-cmd.exp.)
The value field for -var-create is new. I tried to make the regexp as specific
as possible for a more exacting test.
If value=\"($hex).*\" works in all cases (I might have the syntax wrong,
I mean matching "0xabc" and "0xabc \"blah\"") that would be good. Otherwise
just value=\".*\" will do.
--
Nick http://www.inet.net.nz/~nickrob