Re: -var-create testsuite updates [PATCH]

Nick Roberts
2007-03-09T01:41:51Z

> >! 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