Re: [PATCH] MI: Add value field to output of -var-create

Nick Roberts
2007-01-20T21:53:01Z

> Thanks for doing this. I get some new failures - just three though.
>
> FAIL: gdb.mi/gdb701.exp: create fooPtr
> FAIL: gdb.mi/gdb792.exp: create var for class A
> FAIL: gdb.mi/gdb792.exp: create var for class C which has baseclass A

Sorry, I forgot to include these (see below).

> # Why does this have a FIXME?
> setup_xfail *-*-*
> mi_gdb_test "-var-update *" \
> ! "FIXME\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.next.long_ptr\",in_scope=\pe_changed=\"false\"\}\\\]" \
> "update all vars psnp->next->long_ptr (and 1.long_ptr) changed"
> clear_xfail *-*-*
>
> Typo, I think ("in_scope=\pe_changed")?

OK. I could remove the setup_xfail and "FIXME" in the output string as this
test passes for me. WDYT?

--
Nick http://www.inet.net.nz/~nickrob

2007-01-21 Nick Roberts <nickrob@snap.net.nz>

* gdb.mi/gdb701.exp, gdb.mi/gdb792.exp:
Update tests for -var-create to include value field.

Index: gdb.mi/gdb701.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/gdb701.exp,v
retrieving revision 1.3
diff -c -p -r1.3 gdb701.exp
*** gdb.mi/gdb701.exp 9 Jan 2007 17:59:13 -0000 1.3
--- gdb.mi/gdb701.exp 20 Jan 2007 21:50:16 -0000
*************** mi_run_to_main
*** 50,58 ****
# Step over "foo = 0"
mi_next "step over \"foo = 0\""

! mi_gdb_test "-var-create fooPtr * foo" \
! "(&\".*\"\r\n)*\\^done,name=\"fooPtr\",numchild=\"3\",type=\"Foo \\*\"" \
! "create fooPtr"

mi_gdb_test "-var-list-children fooPtr" \
"(&\".*\"\r\n)*\\^done,numchild=\"3\",.*" \
--- 50,56 ----
# Step over "foo = 0"
mi_next "step over \"foo = 0\""

! mi_create_varobj fooPtr foo "create fooPtr"

mi_gdb_test "-var-list-children fooPtr" \
"(&\".*\"\r\n)*\\^done,numchild=\"3\",.*" \
Index: gdb.mi/gdb792.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/gdb792.exp,v
retrieving revision 1.6
diff -c -p -r1.6 gdb792.exp
*** gdb.mi/gdb792.exp 9 Jan 2007 17:59:13 -0000 1.6
--- gdb.mi/gdb792.exp 20 Jan 2007 21:50:16 -0000
*************** if {[gdb_compile $srcdir/$subdir/$srcfil
*** 50,56 ****
mi_run_to_main

mi_gdb_test "-var-create - * a" \
! "(&\".*\"\r\n)*\\^done,name=\"var1\",numchild=\"3\",type=\"A\"" \
"create var for class A"

mi_gdb_test "-var-list-children var1" \
--- 50,56 ----
mi_run_to_main

mi_gdb_test "-var-create - * a" \
! "(&\".*\"\r\n)*\\^done,name=\"var1\",numchild=\"3\",value=\".*\",type=\"A\"" \
"create var for class A"

mi_gdb_test "-var-list-children var1" \
*************** mi_gdb_test "-var-list-children var1.pro
*** 82,88 ****
"list children of A.protected.b.private"

mi_gdb_test "-var-create - * c" \
! "(&\".*\"\r\n)*\\^done,name=\"var2\",numchild=\"3\",type=\"C\"" \
"create var for class C which has baseclass A"

mi_gdb_test "-var-list-children var2" \
--- 82,88 ----
"list children of A.protected.b.private"

mi_gdb_test "-var-create - * c" \
! "(&\".*\"\r\n)*\\^done,name=\"var2\",numchild=\"3\",value=\".*\",type=\"C\"" \
"create var for class C which has baseclass A"

mi_gdb_test "-var-list-children var2" \