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: -var-create testsuite updates [PATCH]


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


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