Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* -var-create testsuite updates
@ 2007-02-09 16:20 Daniel Jacobowitz
  2007-02-09 20:48 ` Nick Roberts
  0 siblings, 1 reply; 13+ messages in thread
From: Daniel Jacobowitz @ 2007-02-09 16:20 UTC (permalink / raw)
  To: gdb-patches

I noticed this today, which I should have thought of earlier:

-mi_gdb_test "-var-create func * func" \
-       "\\^done,name=\"func\",numchild=\"0\",type=\"void \\(\\*\\)\\((void|)\\)\"" \
-       "create local variable func"
+mi_create_varobj func func "create local variable func"

The old tests were deliberately checking that the varobj was created with
the correct type, and the new ones aren't :-(

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: -var-create testsuite updates
  2007-02-09 16:20 -var-create testsuite updates Daniel Jacobowitz
@ 2007-02-09 20:48 ` Nick Roberts
  2007-02-09 20:57   ` Daniel Jacobowitz
  0 siblings, 1 reply; 13+ messages in thread
From: Nick Roberts @ 2007-02-09 20:48 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

 > I noticed this today, which I should have thought of earlier:
 > 
 > -mi_gdb_test "-var-create func * func" \
 > -       "\\^done,name=\"func\",numchild=\"0\",type=\"void \\(\\*\\)\\((void|)\\)\"" \
 > -       "create local variable func"
 > +mi_create_varobj func func "create local variable func"
 > 
 > The old tests were deliberately checking that the varobj was created with
 > the correct type, and the new ones aren't :-(

(Groan) I picked up the tests which were designed to fail but changed the
others by autopilot.  I'll work my way through the changes to work out how many
others we should have kept and submit a new patch.

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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: -var-create testsuite updates
  2007-02-09 20:48 ` Nick Roberts
@ 2007-02-09 20:57   ` Daniel Jacobowitz
  2007-02-11 21:43     ` Nick Roberts
  2007-02-15 20:55     ` -var-create testsuite updates [PATCH] Nick Roberts
  0 siblings, 2 replies; 13+ messages in thread
From: Daniel Jacobowitz @ 2007-02-09 20:57 UTC (permalink / raw)
  To: Nick Roberts; +Cc: gdb-patches

On Sat, Feb 10, 2007 at 09:48:24AM +1300, Nick Roberts wrote:
>  > I noticed this today, which I should have thought of earlier:
>  > 
>  > -mi_gdb_test "-var-create func * func" \
>  > -       "\\^done,name=\"func\",numchild=\"0\",type=\"void \\(\\*\\)\\((void|)\\)\"" \
>  > -       "create local variable func"
>  > +mi_create_varobj func func "create local variable func"
>  > 
>  > The old tests were deliberately checking that the varobj was created with
>  > the correct type, and the new ones aren't :-(
> 
> (Groan) I picked up the tests which were designed to fail but changed the
> others by autopilot.  I'll work my way through the changes to work out how many
> others we should have kept and submit a new patch.

Thanks a lot!  I didn't want to actually ask you to do this, since it's
a pile of grunt work, but it would certainly be nice to have them back.

I only noticed because I had a few patches which changed long to
long( int)? to support another compiler, and they no longer applied.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: -var-create testsuite updates
  2007-02-09 20:57   ` Daniel Jacobowitz
@ 2007-02-11 21:43     ` Nick Roberts
  2007-02-11 21:46       ` Daniel Jacobowitz
  2007-02-12  6:18       ` Vladimir Prus
  2007-02-15 20:55     ` -var-create testsuite updates [PATCH] Nick Roberts
  1 sibling, 2 replies; 13+ messages in thread
From: Nick Roberts @ 2007-02-11 21:43 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

 > > (Groan) I picked up the tests which were designed to fail but changed the
 > > others by autopilot.  I'll work my way through the changes to work out how many
 > > others we should have kept and submit a new patch.
 > 
 > Thanks a lot!  I didn't want to actually ask you to do this, since it's
 > a pile of grunt work, but it would certainly be nice to have them back.
 > 
 > I only noticed because I had a few patches which changed long to
 > long( int)? to support another compiler, and they no longer applied.

Some tests are explicitly testing -var-create e.g mi-var-cmd.exp, others
might not be but still provide a handy check on the output e.g

*** gdb.mi/mi-var-child.exp
  
  # Test: c_variable-4.2
  # Desc: create variable "struct_declarations"
  mi_gdb_test "-var-create struct_declarations * struct_declarations" \
  	"\\^done,name=\"struct_declarations\",numchild=\"11\",type=\"struct _struct_decl\"" \
 	"create local variable struct_declarations"

I don't really like mi_create_varobj as it removes checks on type, number of
children etc.  How about if I revert all my changes which use mi_create_varobj
and just add value=\".*\" to the regexp in each mi_gdb_test for -var-create?

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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: -var-create testsuite updates
  2007-02-11 21:43     ` Nick Roberts
@ 2007-02-11 21:46       ` Daniel Jacobowitz
  2007-02-12  6:18       ` Vladimir Prus
  1 sibling, 0 replies; 13+ messages in thread
From: Daniel Jacobowitz @ 2007-02-11 21:46 UTC (permalink / raw)
  To: Nick Roberts; +Cc: gdb-patches

On Mon, Feb 12, 2007 at 10:42:53AM +1300, Nick Roberts wrote:
> I don't really like mi_create_varobj as it removes checks on type, number of
> children etc.  How about if I revert all my changes which use mi_create_varobj
> and just add value=\".*\" to the regexp in each mi_gdb_test for -var-create?

That would be fine with me.  Another thing we could do would be add
optional arguments to mi_create_varobj to test additional things - but
that's a lot more work.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: -var-create testsuite updates
  2007-02-11 21:43     ` Nick Roberts
  2007-02-11 21:46       ` Daniel Jacobowitz
@ 2007-02-12  6:18       ` Vladimir Prus
  2007-02-12  9:30         ` Nick Roberts
  1 sibling, 1 reply; 13+ messages in thread
From: Vladimir Prus @ 2007-02-12  6:18 UTC (permalink / raw)
  To: Nick Roberts, gdb-patches

Nick Roberts wrote:

>  > > (Groan) I picked up the tests which were designed to fail but changed
>  > > the
>  > > others by autopilot.  I'll work my way through the changes to work
>  > > out how many others we should have kept and submit a new patch.
>  > 
>  > Thanks a lot!  I didn't want to actually ask you to do this, since it's
>  > a pile of grunt work, but it would certainly be nice to have them back.
>  > 
>  > I only noticed because I had a few patches which changed long to
>  > long( int)? to support another compiler, and they no longer applied.
> 
> Some tests are explicitly testing -var-create e.g mi-var-cmd.exp, others
> might not be but still provide a handy check on the output e.g
> 
> *** gdb.mi/mi-var-child.exp
>   
>   # Test: c_variable-4.2
>   # Desc: create variable "struct_declarations"
>   mi_gdb_test "-var-create struct_declarations * struct_declarations" \
>   "\\^done,name=\"struct_declarations\",numchild=\"11\",type=\"struct
>   _struct_decl\"" \
>  "create local variable struct_declarations"
> 
> I don't really like mi_create_varobj as it removes checks on type, number
> of
> children etc.  

This is intentional. Unless you're testing -var-create itself, you don't
need to check every single output field from -var-create, because:

        1. Tests for -var-create itself should test everything already,
        you don't get anything by extra tests.
        2. Checking output of -var-create everywhere means any
        change in that output requires to update expected output,
        which is pointless.

I think there should be "mi_var_create_varobj_test" that tests entire output.
Tests for -var-create itself should use that.

> How about if I revert all my changes which use 
> mi_create_varobj and just add value=\".*\" to the regexp in each
> mi_gdb_test for -var-create?

Why introducing new "mi_var_create_varobj_test" won't work? gdb testsuite
has too much of literal expected output as it is.

- Volodya



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: -var-create testsuite updates
  2007-02-12  6:18       ` Vladimir Prus
@ 2007-02-12  9:30         ` Nick Roberts
  2007-02-13 12:03           ` Daniel Jacobowitz
  0 siblings, 1 reply; 13+ messages in thread
From: Nick Roberts @ 2007-02-12  9:30 UTC (permalink / raw)
  To: Vladimir Prus; +Cc: gdb-patches

 > > Some tests are explicitly testing -var-create e.g mi-var-cmd.exp, others
 > > might not be but still provide a handy check on the output e.g
 > > 
 > > *** gdb.mi/mi-var-child.exp
 > >   
 > >   # Test: c_variable-4.2
 > >   # Desc: create variable "struct_declarations"
 > >   mi_gdb_test "-var-create struct_declarations * struct_declarations" \
 > >   "\\^done,name=\"struct_declarations\",numchild=\"11\",type=\"struct
 > >   _struct_decl\"" \
 > >  "create local variable struct_declarations"
 > > 
 > > I don't really like mi_create_varobj as it removes checks on type, number
 > > of
 > > children etc.  
 > 
 > This is intentional. Unless you're testing -var-create itself, you don't
 > need to check every single output field from -var-create, because:
 >
 >         1. Tests for -var-create itself should test everything already,
 >         you don't get anything by extra tests.

Looking at a test in isolation, its not immediately clear whether it's a test
for -var-create itself, or not.  For example, what about the one above in
mi-var-child.exp.

 >         2. Checking output of -var-create everywhere means any
 >         change in that output requires to update expected output,
 >         which is pointless.

It's tedious but not pointless.  Testing more cases, providing it doesn't add
to the run time, can only be helpful.  Also the output of any change in output
should be tested too.

 > I think there should be "mi_var_create_varobj_test" that tests entire output.
 > Tests for -var-create itself should use that.
 > 
 > > How about if I revert all my changes which use 
 > > mi_create_varobj and just add value=\".*\" to the regexp in each
 > > mi_gdb_test for -var-create?
 > 
 > Why introducing new "mi_var_create_varobj_test" won't work? gdb testsuite
 > has too much of literal expected output as it is.

The example above needs a specific number (11) for numchild.  Are you proposing
to add an argument for each field value?  In which case it might be as easy
to use mi_gdb_test.

I prefer to keep the tests simple so that I can remember how they work.  I
generally just use cut and paste anyway.

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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: -var-create testsuite updates
  2007-02-12  9:30         ` Nick Roberts
@ 2007-02-13 12:03           ` Daniel Jacobowitz
  0 siblings, 0 replies; 13+ messages in thread
From: Daniel Jacobowitz @ 2007-02-13 12:03 UTC (permalink / raw)
  To: Nick Roberts; +Cc: Vladimir Prus, gdb-patches

On Mon, Feb 12, 2007 at 10:29:57PM +1300, Nick Roberts wrote:
> I prefer to keep the tests simple so that I can remember how they work.  I
> generally just use cut and paste anyway.

Another advantage of staying with mi_gdb_test is that if the test
fails, it's easy to see what the .exp file expected.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: -var-create testsuite updates [PATCH]
  2007-02-09 20:57   ` Daniel Jacobowitz
  2007-02-11 21:43     ` Nick Roberts
@ 2007-02-15 20:55     ` Nick Roberts
  2007-02-27 17:10       ` Daniel Jacobowitz
  2007-03-09  1:00       ` Ulrich Weigand
  1 sibling, 2 replies; 13+ messages in thread
From: Nick Roberts @ 2007-02-15 20:55 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

 > >  > The old tests were deliberately checking that the varobj was created
 > >  > with the correct type, and the new ones aren't :-(
 > > 
 > > (Groan) I picked up the tests which were designed to fail but changed the
 > > others by autopilot.  I'll work my way through the changes to work out how
 > > many others we should have kept and submit a new patch.

I've reverted the tests now to use mi_gdb_test and included value field in
output.  I get the same test results.  Where possible, I've used a specific
value in the value field of miN-var-cmd.exp and miN-var-child.exp to try to
pick up any problems with that field.  In the other files I've just used a
wildcard.

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


2007-02-16  Nick Roberts  <nickrob@snap.net.nz>

	* gdb.mi/mi-var-block.exp, gdb.mi/mi2-var-block.exp
	* gdb.mi/mi-var-child.exp, gdb.mi/mi2-var-child.exp
	* gdb.mi/mi-var-child-f.exp, gdb.mi/mi-var-cmd.exp
	* gdb.mi/mi2-var-cmd.exp, gdb.mi/mi-var-display.exp
	* gdb.mi/mi2-var-display.exp, gdb.mi/gdb701.exp
	Revert tests to use mi_gdb_test and include value field in output
	of -var-create.


Index: gdb.mi/mi-var-block.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-block.exp,v
retrieving revision 1.14
diff -c -p -r1.14 mi-var-block.exp
*** gdb.mi/mi-var-block.exp	8 Feb 2007 19:51:14 -0000	1.14
--- gdb.mi/mi-var-block.exp	15 Feb 2007 20:44:18 -0000
*************** mi_runto do_block_tests
*** 44,50 ****
  
  # Test: c_variable-3.2
  # Desc: create cb and foo
! mi_create_varobj cb cb "create local variable cb"
  
  mi_gdb_test "-var-create foo * foo" \
  	"&\"mi_cmd_var_create: unable to create variable object\\\\n\".*\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
--- 44,52 ----
  
  # Test: c_variable-3.2
  # Desc: create cb and foo
! mi_gdb_test "-var-create cb * cb" \
! 	"\\^done,name=\"cb\",numchild=\"0\",value=\".*\",type=\"int\"" \
! 	"create local variable cb"
  
  mi_gdb_test "-var-create foo * foo" \
  	"&\"mi_cmd_var_create: unable to create variable object\\\\n\".*\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
*************** mi_gdb_test "-var-delete foo" \
*** 64,70 ****
  
  # Test: c_variable-3.3
  # Desc: create foo
! mi_create_varobj foo foo "create local variable foo"
  
  # step to "foo2 = 123;"
  mi_step_to "do_block_tests" "" "var-cmd.c" \
--- 66,74 ----
  
  # Test: c_variable-3.3
  # Desc: create foo
! mi_gdb_test "-var-create foo * foo" \
! 	"\\^done,name=\"foo\",numchild=\"0\",value=\".*\",type=\"int\"" \
! 	"create local variable foo"
  
  # step to "foo2 = 123;"
  mi_step_to "do_block_tests" "" "var-cmd.c" \
*************** mi_step_to "do_block_tests" "" "var-cmd.
*** 84,90 ****
  
  # Test: c_variable-3.5
  # Desc: create inner block foo
! mi_create_varobj inner_foo foo "create local variable inner_foo"
  
  # step to "foo2 = 0;"
  mi_step_to "do_block_tests" "" "var-cmd.c" \
--- 88,96 ----
  
  # Test: c_variable-3.5
  # Desc: create inner block foo
! mi_gdb_test "-var-create inner_foo * foo" \
! 	"\\^done,name=\"inner_foo\",numchild=\"0\",value=\".*\",type=\"int\"" \
! 	"create local variable inner_foo"
  
  # step to "foo2 = 0;"
  mi_step_to "do_block_tests" "" "var-cmd.c" \
*************** mi_step_to "do_block_tests" "" "var-cmd.
*** 93,99 ****
  
  # Test: c_variable-3.6
  # Desc: create foo2
! mi_create_varobj foo2 foo2 "create local variable foo2"
  
  # Test: c_variable-3.7
  # Desc: check that outer foo in scope and inner foo out of scope
--- 99,107 ----
  
  # Test: c_variable-3.6
  # Desc: create foo2
! mi_gdb_test "-var-create foo2 * foo2" \
! 	"\\^done,name=\"foo2\",numchild=\"0\",value=\".*\",type=\"int\"" \
! 	"create local variable foo2"
  
  # Test: c_variable-3.7
  # Desc: check that outer foo in scope and inner foo out of scope
Index: gdb.mi/mi2-var-block.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-var-block.exp,v
retrieving revision 1.6
diff -c -p -r1.6 mi2-var-block.exp
*** gdb.mi/mi2-var-block.exp	8 Feb 2007 19:51:14 -0000	1.6
--- gdb.mi/mi2-var-block.exp	15 Feb 2007 20:44:18 -0000
*************** mi_runto do_block_tests
*** 45,51 ****
  
  # Test: c_variable-3.2
  # Desc: create cb and foo
! mi_create_varobj cb cb "create local variable cb"
  
  mi_gdb_test "-var-create foo * foo" \
  	"&\"mi_cmd_var_create: unable to create variable object\\\\n\".*\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
--- 45,53 ----
  
  # Test: c_variable-3.2
  # Desc: create cb and foo
! mi_gdb_test "-var-create cb * cb" \
! 	"\\^done,name=\"cb\",numchild=\"0\",value=\".*\",type=\"int\"" \
! 	"create local variable cb"
  
  mi_gdb_test "-var-create foo * foo" \
  	"&\"mi_cmd_var_create: unable to create variable object\\\\n\".*\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
*************** mi_gdb_test "-var-delete foo" \
*** 65,71 ****
  
  # Test: c_variable-3.3
  # Desc: create foo
! mi_create_varobj foo foo "create local variable foo"
  
  # step to "foo2 = 123;"
  mi_step_to "do_block_tests" "" "var-cmd.c" \
--- 67,75 ----
  
  # Test: c_variable-3.3
  # Desc: create foo
! mi_gdb_test "-var-create foo * foo" \
! 	"\\^done,name=\"foo\",numchild=\"0\",value=\".*\",type=\"int\"" \
! 	"create local variable foo"
  
  # step to "foo2 = 123;"
  mi_step_to "do_block_tests" "" "var-cmd.c" \
*************** mi_step_to "do_block_tests" "" "var-cmd.
*** 85,91 ****
  
  # Test: c_variable-3.5
  # Desc: create inner block foo
! mi_create_varobj inner_foo foo "create local variable inner_foo"
  
  # step to "foo2 = 0;"
  mi_step_to "do_block_tests" "" "var-cmd.c" \
--- 89,97 ----
  
  # Test: c_variable-3.5
  # Desc: create inner block foo
! mi_gdb_test "-var-create inner_foo * foo" \
! 	"\\^done,name=\"inner_foo\",numchild=\"0\",value=\".*\",type=\"int\"" \
! 	"create local variable inner_foo"
  
  # step to "foo2 = 0;"
  mi_step_to "do_block_tests" "" "var-cmd.c" \
*************** mi_step_to "do_block_tests" "" "var-cmd.
*** 94,100 ****
  
  # Test: c_variable-3.6
  # Desc: create foo2
! mi_create_varobj foo2 foo2 "create local variable foo2"
  
  # Test: c_variable-3.7
  # Desc: check that outer foo in scope and inner foo out of scope
--- 100,108 ----
  
  # Test: c_variable-3.6
  # Desc: create foo2
! mi_gdb_test "-var-create foo2 * foo2" \
! 	"\\^done,name=\"foo2\",numchild=\"0\",value=\".*\",type=\"int\"" \
! 	"create local variable foo2"
  
  # Test: c_variable-3.7
  # Desc: check that outer foo in scope and inner foo out of scope
Index: gdb.mi/mi-var-child.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-child.exp,v
retrieving revision 1.23
diff -c -p -r1.23 mi-var-child.exp
*** gdb.mi/mi-var-child.exp	8 Feb 2007 19:51:14 -0000	1.23
--- gdb.mi/mi-var-child.exp	15 Feb 2007 20:44:22 -0000
*************** mi_execute_to "exec-next" "end-stepping-
*** 56,63 ****
  
  # Test: c_variable-4.2
  # Desc: create variable "struct_declarations"
! mi_create_varobj struct_declarations struct_declarations \
!     "create local variable struct_declarations"
  
  # Test: c_variable-4.3
  # Desc: children of struct_declarations
--- 56,64 ----
  
  # Test: c_variable-4.2
  # Desc: create variable "struct_declarations"
! mi_gdb_test "-var-create struct_declarations * struct_declarations" \
! 	"\\^done,name=\"struct_declarations\",numchild=\"11\",value=\"{...}\",type=\"struct _struct_decl\"" \
! 	"create local variable struct_declarations"
  
  # Test: c_variable-4.3
  # Desc: children of struct_declarations
*************** mi_step_to do_children_tests {} ".*${src
*** 563,569 ****
  
  # Test: c_variable-4.81
  # Desc: create local variable "weird"
! mi_create_varobj weird weird "create local variable weird"
  
  # Test: c_variable-4.82
  # Desc: children of weird
--- 564,572 ----
  
  # Test: c_variable-4.81
  # Desc: create local variable "weird"
! mi_gdb_test "-var-create weird * weird" \
! 	"\\^done,name=\"weird\",numchild=\"11\",value=\"$hex\",type=\"weird_struct \\*\"" \
! 	"create local variable weird"
  
  # Test: c_variable-4.82
  # Desc: children of weird
*************** mi_gdb_test "-var-info-num-children weir
*** 625,632 ****
  
  # Test: c_variable-4.90
  # Desc: create weird->int_ptr_ptr
! mi_create_varobj weird->int_ptr_ptr weird->int_ptr_ptr \
!     "create local variable weird->int_ptr_ptr"
  
  # Test: c_variable-4.91
  # Desc: children of weird->int_ptr_ptr
--- 628,636 ----
  
  # Test: c_variable-4.90
  # Desc: create weird->int_ptr_ptr
! mi_gdb_test "-var-create weird->int_ptr_ptr * weird->int_ptr_ptr" \
! 	"\\^done,name=\"weird->int_ptr_ptr\",numchild=\"1\",value=\"$hex\",type=\"int \\*\\*\"" \
! 	"create local variable weird->int_ptr_ptr"
  
  # Test: c_variable-4.91
  # Desc: children of weird->int_ptr_ptr
*************** mi_execute_to "exec-step 43" "end-steppi
*** 890,897 ****
  
  # Test: c_variable-5.10
  # Desc: create psnp->char_ptr
! mi_create_varobj psnp->char_ptr psnp->char_ptr \
!     "create local variable  psnp->char_ptr"
  
  # Test: c_variable-5.11
  # Desc: children of psnp->char_ptr
--- 894,902 ----
  
  # Test: c_variable-5.10
  # Desc: create psnp->char_ptr
! mi_gdb_test "-var-create  psnp->char_ptr *  psnp->char_ptr" \
! 	"\\^done,name=\"psnp->char_ptr\",numchild=\"1\",value=\".*\",type=\"char \\*\\*\\*\\*\"" \
! 	"create local variable  psnp->char_ptr"
  
  # Test: c_variable-5.11
  # Desc: children of psnp->char_ptr
*************** mi_gdb_test "-var-info-num-children psnp
*** 962,969 ****
  
  # Test: c_variable-5.19
  # Desc: create psnp->long_ptr
! mi_create_varobj psnp->long_ptr psnp->long_ptr \
!     "create local variable  psnp->long_ptr"
  
  # Test: c_variable-5.20
  # Desc: children of psnp->long_ptr
--- 967,975 ----
  
  # Test: c_variable-5.19
  # Desc: create psnp->long_ptr
! mi_gdb_test "-var-create  psnp->long_ptr *  psnp->long_ptr" \
! 	"\\^done,name=\"psnp->long_ptr\",numchild=\"1\",value=\"$hex\",type=\"long int \\*\\*\\*\\*\"" \
! 	"create local variable  psnp->long_ptr"
  
  # Test: c_variable-5.20
  # Desc: children of psnp->long_ptr
*************** mi_gdb_test "-var-info-num-children psnp
*** 1028,1034 ****
  
  # Test: c_variable-5.30
  # Desc: create psnp->ptrs
! mi_create_varobj psnp->ptrs psnp->ptrs "create local variable  psnp->ptrs"
  
  # Test: c_variable-5.31
  # Desc: children of psnp->ptrs
--- 1034,1042 ----
  
  # Test: c_variable-5.30
  # Desc: create psnp->ptrs
! mi_gdb_test "-var-create  psnp->ptrs *  psnp->ptrs" \
!     "\\^done,name=\"psnp->ptrs\",numchild=\"3\",value=\"\\\[3\\\]\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"" \
! 	"create local variable  psnp->ptrs"
  
  # Test: c_variable-5.31
  # Desc: children of psnp->ptrs
Index: gdb.mi/mi2-var-child.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-var-child.exp,v
retrieving revision 1.5
diff -c -p -r1.5 mi2-var-child.exp
*** gdb.mi/mi2-var-child.exp	8 Feb 2007 19:51:14 -0000	1.5
--- gdb.mi/mi2-var-child.exp	15 Feb 2007 20:44:26 -0000
*************** mi_runto do_children_tests
*** 51,58 ****
  
  # Test: c_variable-4.2
  # Desc: create variable "struct_declarations"
! mi_create_varobj struct_declarations struct_declarations \
!     "create local variable struct_declarations"
  
  # Test: c_variable-4.3
  # Desc: children of struct_declarations
--- 51,59 ----
  
  # Test: c_variable-4.2
  # Desc: create variable "struct_declarations"
! mi_gdb_test "-var-create struct_declarations * struct_declarations" \
! 	"\\^done,name=\"struct_declarations\",numchild=\"11\",value=\"{...}\",type=\"struct _struct_decl\"" \
! 	"create local variable struct_declarations"
  
  # Test: c_variable-4.3
  # Desc: children of struct_declarations
*************** mi_step_to do_children_tests {} {.*var-c
*** 558,564 ****
  
  # Test: c_variable-4.81
  # Desc: create local variable "weird"
! mi_create_varobj weird weird "create local variable weird"
  
  # Test: c_variable-4.82
  # Desc: children of weird
--- 559,567 ----
  
  # Test: c_variable-4.81
  # Desc: create local variable "weird"
! mi_gdb_test "-var-create weird * weird" \
! 	"\\^done,name=\"weird\",numchild=\"11\",value=\"$hex\",type=\"weird_struct \\*\"" \
! 	"create local variable weird"
  
  # Test: c_variable-4.82
  # Desc: children of weird
*************** mi_gdb_test "-var-info-num-children weir
*** 620,627 ****
  
  # Test: c_variable-4.90
  # Desc: create weird->int_ptr_ptr
! mi_create_varobj weird->int_ptr_ptr weird->int_ptr_ptr \
!     "create local variable weird->int_ptr_ptr"
  
  # Test: c_variable-4.91
  # Desc: children of weird->int_ptr_ptr
--- 623,631 ----
  
  # Test: c_variable-4.90
  # Desc: create weird->int_ptr_ptr
! mi_gdb_test "-var-create weird->int_ptr_ptr * weird->int_ptr_ptr" \
! 	"\\^done,name=\"weird->int_ptr_ptr\",numchild=\"1\",value=\"$hex\",type=\"int \\*\\*\"" \
! 	"create local variable weird->int_ptr_ptr"
  
  # Test: c_variable-4.91
  # Desc: children of weird->int_ptr_ptr
*************** mi_execute_to "exec-step 43" "end-steppi
*** 861,868 ****
  
  # Test: c_variable-5.10
  # Desc: create psnp->char_ptr
! mi_create_varobj psnp->char_ptr psnp->char_ptr \
!     "create local variable  psnp->char_ptr"
  
  # Test: c_variable-5.11
  # Desc: children of psnp->char_ptr
--- 865,873 ----
  
  # Test: c_variable-5.10
  # Desc: create psnp->char_ptr
! mi_gdb_test "-var-create  psnp->char_ptr *  psnp->char_ptr" \
! 	"\\^done,name=\"psnp->char_ptr\",numchild=\"1\",value=\".*\",type=\"char \\*\\*\\*\\*\"" \
! 	"create local variable  psnp->char_ptr"
  
  # Test: c_variable-5.11
  # Desc: children of psnp->char_ptr
*************** mi_gdb_test "-var-info-num-children psnp
*** 933,940 ****
  
  # Test: c_variable-5.19
  # Desc: create psnp->long_ptr
! mi_create_varobj psnp->long_ptr psnp->long_ptr \
!     "create local variable  psnp->long_ptr"
  
  # Test: c_variable-5.20
  # Desc: children of psnp->long_ptr
--- 938,946 ----
  
  # Test: c_variable-5.19
  # Desc: create psnp->long_ptr
! mi_gdb_test "-var-create  psnp->long_ptr *  psnp->long_ptr" \
! 	"\\^done,name=\"psnp->long_ptr\",numchild=\"1\",value=\"$hex\",type=\"long int \\*\\*\\*\\*\"" \
! 	"create local variable  psnp->long_ptr"
  
  # Test: c_variable-5.20
  # Desc: children of psnp->long_ptr
*************** mi_gdb_test "-var-info-num-children psnp
*** 999,1006 ****
  
  # Test: c_variable-5.30
  # Desc: create psnp->ptrs
! mi_create_varobj psnp->ptrs psnp->ptrs "create local variable  psnp->ptrs"
! 
  
  # Test: c_variable-5.31
  # Desc: children of psnp->ptrs
--- 1005,1013 ----
  
  # Test: c_variable-5.30
  # Desc: create psnp->ptrs
! mi_gdb_test "-var-create  psnp->ptrs *  psnp->ptrs" \
! 	"\\^done,name=\"psnp->ptrs\",numchild=\"3\",value=\"\\\[3\\\]\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"" \
! 	"create local variable  psnp->ptrs"
  
  # Test: c_variable-5.31
  # Desc: children of psnp->ptrs
Index: gdb.mi/mi-var-child-f.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-child-f.exp,v
retrieving revision 1.5
diff -c -p -r1.5 mi-var-child-f.exp
*** gdb.mi/mi-var-child-f.exp	8 Feb 2007 19:51:14 -0000	1.5
--- gdb.mi/mi-var-child-f.exp	15 Feb 2007 20:44:26 -0000
*************** mi_gdb_load ${binfile}
*** 38,44 ****
  
  mi_runto MAIN__
  
! mi_create_varobj "array" "array" "create local variable array"
  
  mi_gdb_test "-var-list-children --all-values array" \
      "\\^done,numchild=\"3\",children=\\\[child=\{name=\"array.-1\",exp=\"-1\",numchild=\"2\",value=\"\\\[2\\\]\",type=\"integer \\(2\\)\"\},child=\{name=\"array.0\",exp=\"0\",numchild=\"2\",value=\"\\\[2\\\]\",type=\"integer \\(2\\)\"\},child=\{name=\"array.1\",exp=\"1\",numchild=\"2\",value=\"\\\[2\\\]\",type=\"integer \\(2\\)\"\}\\\]" \
--- 38,46 ----
  
  mi_runto MAIN__
  
! mi_gdb_test "-var-create array * array" \
!     "\\^done,name=\"array\",numchild=\"3\",value=\".*\",type=\"integer \\(2,-1:1\\)\"" \
!     "create local variable array"
  
  mi_gdb_test "-var-list-children --all-values array" \
      "\\^done,numchild=\"3\",children=\\\[child=\{name=\"array.-1\",exp=\"-1\",numchild=\"2\",value=\"\\\[2\\\]\",type=\"integer \\(2\\)\"\},child=\{name=\"array.0\",exp=\"0\",numchild=\"2\",value=\"\\\[2\\\]\",type=\"integer \\(2\\)\"\},child=\{name=\"array.1\",exp=\"1\",numchild=\"2\",value=\"\\\[2\\\]\",type=\"integer \\(2\\)\"\}\\\]" \
Index: gdb.mi/mi-var-cmd.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-cmd.exp,v
retrieving revision 1.25
diff -c -p -r1.25 mi-var-cmd.exp
*** gdb.mi/mi-var-cmd.exp	8 Feb 2007 19:51:14 -0000	1.25
--- gdb.mi/mi-var-cmd.exp	15 Feb 2007 20:44:27 -0000
*************** mi_gdb_load ${binfile}
*** 52,58 ****
  # Desc:  Create global variable
  
  mi_gdb_test "111-var-create global_simple * global_simple" \
! 	"111\\^done,name=\"global_simple\",numchild=\"6\",value=\".*\",type=\"simpleton\"" \
  	"create global variable"
  
  # Test: c_variable-1.2
--- 52,58 ----
  # Desc:  Create global variable
  
  mi_gdb_test "111-var-create global_simple * global_simple" \
! 	"111\\^done,name=\"global_simple\",numchild=\"6\",value=\"{...}\",type=\"simpleton\"" \
  	"create global variable"
  
  # Test: c_variable-1.2
*************** mi_runto do_locals_tests
*** 74,116 ****
  # Test: c_variable-1.4
  # Desc: create local variables
  
! mi_create_varobj linteger linteger "create local variable linteger"
! 
! mi_create_varobj lpinteger lpinteger "create local variable lpinteger"
! 
! mi_create_varobj lcharacter lcharacter "create local variable lcharacter"
! 
! mi_create_varobj lpcharacter lpcharacter "create local variable lpcharacter"
! 
! mi_create_varobj llong llong "create local variable llong"
! 
! mi_create_varobj lplong lplong "create local variable lplong"
! 
! mi_create_varobj lfloat lfloat "create local variable lfloat"
! 
! mi_create_varobj lpfloat lpfloat "create local variable lpfloat"
! 
! mi_create_varobj ldouble ldouble "create local variable ldouble"
! 
! mi_create_varobj lpdouble lpdouble "create local variable lpdouble"
! 
! mi_create_varobj lsimple lsimple "create local variable lsimple"
! 
! mi_create_varobj lpsimple lpsimple "create local variable lpsimple"
  
! mi_create_varobj func func "create local variable func"
  
  # Test: c_variable-1.5
  # Desc: create lsimple.character
! mi_create_varobj lsimple.character lsimple.character "create lsimple.character"
  
  # Test: c_variable-1.6
  # Desc: create lpsimple->integer
! mi_create_varobj lsimple->integer lsimple->integer "create lsimple->integer"
  
  # Test: c_variable-1.7
  # Desc: ceate lsimple.integer
! mi_create_varobj lsimple.integer lsimple.integer "create lsimple->integer"
  
  # Test: c_variable-1.9
  # Desc: create type name
--- 74,149 ----
  # Test: c_variable-1.4
  # Desc: create local variables
  
! mi_gdb_test "-var-create linteger * linteger" \
! 	"\\^done,name=\"linteger\",numchild=\"0\",value=\".*\",type=\"int\"" \
! 	"create local variable linteger"
  
! mi_gdb_test "-var-create lpinteger * lpinteger" \
! 	"\\^done,name=\"lpinteger\",numchild=\"1\",value=\"$hex\",type=\"int \\*\"" \
! 	"create local variable lpinteger"
! 
! mi_gdb_test "-var-create lcharacter * lcharacter" \
! 	"\\^done,name=\"lcharacter\",numchild=\"0\",value=\".*\",type=\"char\"" \
! 	"create local variablelcharacter "
! 
! mi_gdb_test "-var-create lpcharacter * lpcharacter" \
! 	"\\^done,name=\"lpcharacter\",numchild=\"1\",value=\"$hex \\\\\".*\\\\\"\",type=\"char \\*\"" \
!  	"create local variable lpcharacter"
! 
! mi_gdb_test "-var-create llong * llong" \
! 	"\\^done,name=\"llong\",numchild=\"0\",value=\".*\",type=\"long int\"" \
! 	"create local variable llong"
! 
! mi_gdb_test "-var-create lplong * lplong" \
! 	"\\^done,name=\"lplong\",numchild=\"1\",value=\"$hex\",type=\"long int \\*\"" \
! 	"create local variable lplong"
! 
! mi_gdb_test "-var-create lfloat * lfloat" \
! 	"\\^done,name=\"lfloat\",numchild=\"0\",value=\".*\",type=\"float\"" \
! 	"create local variable lfloat"
! 
! mi_gdb_test "-var-create lpfloat * lpfloat" \
! 	"\\^done,name=\"lpfloat\",numchild=\"1\",value=\"$hex\",type=\"float \\*\"" \
! 	"create local variable lpfloat"
! 
! mi_gdb_test "-var-create ldouble * ldouble" \
! 	"\\^done,name=\"ldouble\",numchild=\"0\",value=\".*\",type=\"double\"" \
! 	"create local variable ldouble"
! 
! mi_gdb_test "-var-create lpdouble * lpdouble" \
! 	"\\^done,name=\"lpdouble\",numchild=\"1\",value=\"$hex\",type=\"double \\*\"" \
! 	"create local variable lpdouble"
! 
! mi_gdb_test "-var-create lsimple * lsimple" \
! 	"\\^done,name=\"lsimple\",numchild=\"6\",value=\"{...}\",type=\"struct _simple_struct\"" \
! 	"create local variable lsimple"
! 
! mi_gdb_test "-var-create lpsimple * lpsimple" \
! 	"\\^done,name=\"lpsimple\",numchild=\"6\",value=\"$hex\",type=\"struct _simple_struct \\*\"" \
! 	"create local variable lpsimple"
! 
! mi_gdb_test "-var-create func * func" \
! 	"\\^done,name=\"func\",numchild=\"0\",value=\"$hex\",type=\"void \\(\\*\\)\\((void|)\\)\"" \
! 	"create local variable func"
  
  # Test: c_variable-1.5
  # Desc: create lsimple.character
! mi_gdb_test "-var-create lsimple.character * lsimple.character" \
! 	"\\^done,name=\"lsimple.character\",numchild=\"0\",value=\".*\",type=\"char\"" \
! 	"create lsimple.character"
  
  # Test: c_variable-1.6
  # Desc: create lpsimple->integer
! mi_gdb_test "-var-create lsimple->integer * lsimple->integer" \
! 	"\\^done,name=\"lsimple->integer\",numchild=\"0\",value=\".*\",type=\"int\"" \
! 	"create lsimple->integer"
  
  # Test: c_variable-1.7
  # Desc: ceate lsimple.integer
! mi_gdb_test "-var-create lsimple.integer * lsimple.integer" \
! 	"\\^done,name=\"lsimple.integer\",numchild=\"0\",value=\".*\",type=\"int\"" \
! 	"create lsimple->integer"
! 
  
  # Test: c_variable-1.9
  # Desc: create type name
*************** mi_gdb_test "-var-update *" \
*** 370,376 ****
  	"\\^done,changelist=\\\[\\\]" \
  	"assign same value to func (update)"
  
! mi_create_varobj array_ptr array_ptr "create global variable array_ptr"
  
  mi_gdb_test "-var-assign array_ptr array2" \
  	"\\^done,value=\"$hex\"" \
--- 403,411 ----
  	"\\^done,changelist=\\\[\\\]" \
  	"assign same value to func (update)"
  
! mi_gdb_test "-var-create array_ptr * array_ptr" \
! 	"\\^done,name=\"array_ptr\",numchild=\"1\",value=\"$hex\",type=\"int \\*\"" \
! 	"create global variable array_ptr"
  
  mi_gdb_test "-var-assign array_ptr array2" \
  	"\\^done,value=\"$hex\"" \
*************** mi_continue_to subroutine1
*** 399,407 ****
  
  # Test: c_variable-2.10
  # Desc: create variable for locals i,l in subroutine1
! mi_create_varobj i i "create i"
! 
! mi_create_varobj l l "create l"
  
  # Test: c_variable-2.11
  # Desc: create do_locals_tests local in subroutine1
--- 434,446 ----
  
  # Test: c_variable-2.10
  # Desc: create variable for locals i,l in subroutine1
! mi_gdb_test "-var-create i  * i" \
! 	"\\^done,name=\"i\",numchild=\"0\",value=\"4321\",type=\"int\"" \
! 	"create i"
! 
! mi_gdb_test "-var-create l * l" \
! 	"\\^done,name=\"l\",numchild=\"1\",value=\"$hex\",type=\"long int \\*\"" \
! 	"create l"
  
  # Test: c_variable-2.11
  # Desc: create do_locals_tests local in subroutine1
*************** mi_gdb_test "-var-update selected_a" \
*** 556,562 ****
  
  # A varobj we fail to read during -var-update should be considered
  # out of scope.
! mi_create_varobj null_ptr **0 "create null_ptr"
  
  # Allow this to succeed, if address zero is readable, although it
  # will not test what it was meant to.  Most important is that GDB
--- 595,603 ----
  
  # A varobj we fail to read during -var-update should be considered
  # out of scope.
! mi_gdb_test "-var-create null_ptr * **0" \
!     {\^done,name="null_ptr",numchild="0",value=".*",type="int"} \
!     "create null_ptr"
  
  # Allow this to succeed, if address zero is readable, although it
  # will not test what it was meant to.  Most important is that GDB
*************** mi_gdb_test "kill" \
*** 579,585 ****
      {&"kill\\n".*\^done} \
      "kill program before endvar"
  
! mi_create_varobj endvar _end "create endvar"
  
  # Allow this to succeed whether the value is readable, unreadable, or
  # missing.  Most important is that GDB does not crash.
--- 620,628 ----
      {&"kill\\n".*\^done} \
      "kill program before endvar"
  
! mi_gdb_test "-var-create endvar * _end" \
!     {(\^done,name="endvar",numchild="0",value=".*",type=".*"|&".*unable to.*".*\^error,msg=".*")} \
!     "create endvar"
  
  # Allow this to succeed whether the value is readable, unreadable, or
  # missing.  Most important is that GDB does not crash.
Index: gdb.mi/mi2-var-display.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-var-display.exp,v
retrieving revision 1.9
diff -c -p -r1.9 mi2-var-display.exp
*** gdb.mi/mi2-var-display.exp	8 Feb 2007 19:51:14 -0000	1.9
--- gdb.mi/mi2-var-display.exp	15 Feb 2007 20:44:29 -0000
*************** gdb_expect {
*** 65,71 ****
  
  # Test: c_variable-6.1
  # Desc: create variable bar
! mi_create_varobj bar bar "create local variable bar"
  
  # Test: c_variable-6.2
  # Desc: type of variable bar
--- 65,73 ----
  
  # Test: c_variable-6.1
  # Desc: create variable bar
! mi_gdb_test "-var-create bar * bar" \
! 	"\\^done,name=\"bar\",numchild=\"0\",value=\".*\",type=\"int\"" \
! 	"create local variable bar"
  
  # Test: c_variable-6.2
  # Desc: type of variable bar
*************** mi_gdb_test "-var-delete bar" \
*** 117,123 ****
  
  # Test: c_variable-6.11
  # Desc: create variable foo
! mi_create_varobj foo foo "create local variable foo"
  
  # Test: c_variable-6.12
  # Desc: type of variable foo
--- 119,127 ----
  
  # Test: c_variable-6.11
  # Desc: create variable foo
! mi_gdb_test "-var-create foo * foo" \
! 	"\\^done,name=\"foo\",numchild=\"1\",value=\".*\",type=\"int \\*\"" \
! 	"create local variable foo"
  
  # Test: c_variable-6.12
  # Desc: type of variable foo
*************** mi_gdb_test "-var-delete foo" \
*** 175,181 ****
  
  # Test: c_variable-6.21
  # Desc: create variable weird and children
! mi_create_varobj weird weird "create local variable weird"
  
  mi_gdb_test "-var-list-children weird" \
  	"\\^done,numchild=\"11\",children=\\\[child=\{name=\"weird.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"weird.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child={name=\"weird.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"weird.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"weird.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"weird.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\((void|)\\)\"\},child=\{name=\"weird.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long int|)\\)\"\},child=\{name=\"weird.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int|)\\)\"\},child=\{name=\"weird.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"weird.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\\\]" \
--- 179,187 ----
  
  # Test: c_variable-6.21
  # Desc: create variable weird and children
! mi_gdb_test "-var-create weird * weird" \
! 	"\\^done,name=\"weird\",numchild=\"11\",value=\".*\",type=\"weird_struct \\*\"" \
! 	"create local variable weird"
  
  mi_gdb_test "-var-list-children weird" \
  	"\\^done,numchild=\"11\",children=\\\[child=\{name=\"weird.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"weird.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child={name=\"weird.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"weird.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"weird.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"weird.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\((void|)\\)\"\},child=\{name=\"weird.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long int|)\\)\"\},child=\{name=\"weird.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int|)\\)\"\},child=\{name=\"weird.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"weird.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\\\]" \
*************** gdb_expect {
*** 338,344 ****
  
  # Test: c_variable-7.10
  # Desc: create union u
! mi_create_varobj u u "create local variable u"
  
  # Test: c_variable-7.11
  # Desc: value of u
--- 344,352 ----
  
  # Test: c_variable-7.10
  # Desc: create union u
! mi_gdb_test "-var-create u * u" \
! 	"\\^done,name=\"u\",numchild=\"2\",value=\".*\",type=\"union named_union\"" \
! 	"create local variable u"
  
  # Test: c_variable-7.11
  # Desc: value of u
*************** mi_gdb_test "-var-list-children u" \
*** 372,378 ****
  
  # Test: c_variable-7.20
  # Desc: create anonu
! mi_create_varobj anonu anonu "create local variable anonu"
  
  # Test: c_variable-7.21
  # Desc: value of anonu
--- 380,388 ----
  
  # Test: c_variable-7.20
  # Desc: create anonu
! mi_gdb_test "-var-create anonu * anonu" \
! 	"\\^done,name=\"anonu\",numchild=\"3\",value=\".*\",type=\"union \{\\.\\.\\.\}\"" \
! 	"create local variable anonu"
  
  # Test: c_variable-7.21
  # Desc: value of anonu
*************** mi_gdb_test "-var-list-children anonu" \
*** 406,412 ****
  
  # Test: c_variable-7.30
  # Desc: create struct s
! mi_create_varobj s s "create local variable s"
  
  # Test: c_variable-7.31
  # Desc: value of s
--- 416,425 ----
  
  # Test: c_variable-7.30
  # Desc: create struct s
! mi_gdb_test "-var-create s * s" \
! 	"\\^done,name=\"s\",numchild=\"6\",value=\".*\",type=\"struct _simple_struct\"" \
! 	"create local variable s"
! 
  
  # Test: c_variable-7.31
  # Desc: value of s
*************** mi_gdb_test "-var-list-children s" \
*** 441,447 ****
  
  # Test: c_variable-7.40
  # Desc: create anons
! mi_create_varobj anons anons "create local variable anons"
  
  # Test: c_variable-7.41
  # Desc: value of anons
--- 454,462 ----
  
  # Test: c_variable-7.40
  # Desc: create anons
! mi_gdb_test "-var-create anons * anons" \
! 	"\\^done,name=\"anons\",numchild=\"3\",value=\".*\",type=\"struct \{\\.\\.\\.\}\"" \
! 	"create local variable anons"
  
  # Test: c_variable-7.41
  # Desc: value of anons
*************** mi_gdb_test "-var-list-children anons" \
*** 476,482 ****
  
  # Test: c_variable-7.50
  # Desc: create enum e
! mi_create_varobj e e "create local variable e"
  
  setup_xfail "*-*-*"
  # Test: c_variable-7.51
--- 491,499 ----
  
  # Test: c_variable-7.50
  # Desc: create enum e
! mi_gdb_test "-var-create e * e" \
! 	"\\^done,name=\"e\",numchild=\"0\",value=\".*\",type=\"enum foo\"" \
! 	"create local variable e"
  
  setup_xfail "*-*-*"
  # Test: c_variable-7.51
*************** mi_gdb_test "-var-list-children e" \
*** 512,518 ****
  
  # Test: c_variable-7.60
  # Desc: create anone
! mi_create_varobj anone anone "create local variable anone"
  
  setup_xfail "*-*-*"
  # Test: c_variable-7.61
--- 529,537 ----
  
  # Test: c_variable-7.60
  # Desc: create anone
! mi_gdb_test "-var-create anone * anone" \
! 	"\\^done,name=\"anone\",numchild=\"0\",value=\".*\",type=\"enum \{\\.\\.\\.\}\"" \
! 	"create local variable anone"
  
  setup_xfail "*-*-*"
  # Test: c_variable-7.61
*************** gdb_expect {
*** 591,597 ****
  
  # Test: c_variable-7.81
  # Desc: Create variables in different scopes
! mi_create_varobj a1 a "create local variable a1"
  
  mi_gdb_test "-var-create a2 $fp a" \
  	"\\^done,name=\"a2\",numchild=\"0\",value=\".*\",type=\"int\"" \
--- 610,618 ----
  
  # Test: c_variable-7.81
  # Desc: Create variables in different scopes
! mi_gdb_test "-var-create a1 * a" \
! 	"\\^done,name=\"a1\",numchild=\"0\",value=\".*\",type=\"char\"" \
! 	"create local variable a1"
  
  mi_gdb_test "-var-create a2 $fp a" \
  	"\\^done,name=\"a2\",numchild=\"0\",value=\".*\",type=\"int\"" \
Index: gdb.mi/gdb701.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/gdb701.exp,v
retrieving revision 1.4
diff -c -p -r1.4 gdb701.exp
*** gdb.mi/gdb701.exp	8 Feb 2007 19:51:14 -0000	1.4
--- gdb.mi/gdb701.exp	15 Feb 2007 20:44:29 -0000
*************** mi_run_to_main
*** 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\",.*" \
--- 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\",value=\".*\",type=\"Foo \\*\"" \
!   "create fooPtr"
  
  mi_gdb_test "-var-list-children fooPtr" \
    "(&\".*\"\r\n)*\\^done,numchild=\"3\",.*" \

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: -var-create testsuite updates [PATCH]
  2007-02-15 20:55     ` -var-create testsuite updates [PATCH] Nick Roberts
@ 2007-02-27 17:10       ` Daniel Jacobowitz
  2007-03-09  1:00       ` Ulrich Weigand
  1 sibling, 0 replies; 13+ messages in thread
From: Daniel Jacobowitz @ 2007-02-27 17:10 UTC (permalink / raw)
  To: Nick Roberts; +Cc: gdb-patches

On Fri, Feb 16, 2007 at 09:54:43AM +1300, Nick Roberts wrote:
>  > >  > The old tests were deliberately checking that the varobj was created
>  > >  > with the correct type, and the new ones aren't :-(
>  > > 
>  > > (Groan) I picked up the tests which were designed to fail but changed the
>  > > others by autopilot.  I'll work my way through the changes to work out how
>  > > many others we should have kept and submit a new patch.
> 
> I've reverted the tests now to use mi_gdb_test and included value field in
> output.  I get the same test results.  Where possible, I've used a specific
> value in the value field of miN-var-cmd.exp and miN-var-child.exp to try to
> pick up any problems with that field.  In the other files I've just used a
> wildcard.

Thanks a lot for doing this, Nick.  The patch is OK.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: -var-create testsuite updates [PATCH]
  2007-02-15 20:55     ` -var-create testsuite updates [PATCH] Nick Roberts
  2007-02-27 17:10       ` Daniel Jacobowitz
@ 2007-03-09  1:00       ` Ulrich Weigand
  2007-03-09  1:41         ` Nick Roberts
  1 sibling, 1 reply; 13+ messages in thread
From: Ulrich Weigand @ 2007-03-09  1:00 UTC (permalink / raw)
  To: Nick Roberts; +Cc: Daniel Jacobowitz, gdb-patches

Nick Roberts wrote:

>2007-02-16  Nick Roberts  <nickrob@snap.net.nz>
>
>        * gdb.mi/mi-var-block.exp, gdb.mi/mi2-var-block.exp
>        * gdb.mi/mi-var-child.exp, gdb.mi/mi2-var-child.exp
>        * gdb.mi/mi-var-child-f.exp, gdb.mi/mi-var-cmd.exp
>        * gdb.mi/mi2-var-cmd.exp, gdb.mi/mi-var-display.exp
>        * gdb.mi/mi2-var-display.exp, gdb.mi/gdb701.exp
>        Revert tests to use mi_gdb_test and include value field in output
>        of -var-create.

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

(B.t.w. the same problem occurs also in mi2-var-cmd.exp.)

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: -var-create testsuite updates [PATCH]
  2007-03-09  1:00       ` Ulrich Weigand
@ 2007-03-09  1:41         ` Nick Roberts
  2007-03-09  2:22           ` Ulrich Weigand
  0 siblings, 1 reply; 13+ messages in thread
From: Nick Roberts @ 2007-03-09  1:41 UTC (permalink / raw)
  To: Ulrich Weigand; +Cc: Daniel Jacobowitz, gdb-patches

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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: -var-create testsuite updates [PATCH]
  2007-03-09  1:41         ` Nick Roberts
@ 2007-03-09  2:22           ` Ulrich Weigand
  0 siblings, 0 replies; 13+ messages in thread
From: Ulrich Weigand @ 2007-03-09  2:22 UTC (permalink / raw)
  To: Nick Roberts; +Cc: Daniel Jacobowitz, gdb-patches

Nick Roberts wrote:

> The test is wrong.  It looks like SPU initialises locals to 0.

Not necessarily, but it may happen.

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

value=\"$hex.*\" works for me.  I've checked in the following patch.

Thanks,
Ulrich



ChangeLog:

	* gdb.mi/mi-var-cmd.exp: Allow value without "..." string
	for -var-create lpcharacter test.
	* gdb.mi/mi2-var-cmd.exp: Likewise.

Index: gdb/testsuite/gdb.mi/mi-var-cmd.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-cmd.exp,v
retrieving revision 1.28
diff -u -p -r1.28 mi-var-cmd.exp
--- gdb/testsuite/gdb.mi/mi-var-cmd.exp	9 Mar 2007 01:14:12 -0000	1.28
+++ gdb/testsuite/gdb.mi/mi-var-cmd.exp	9 Mar 2007 02:16:14 -0000
@@ -87,7 +87,7 @@ mi_gdb_test "-var-create lcharacter * lc
 	"create local variable lcharacter "
 
 mi_gdb_test "-var-create lpcharacter * lpcharacter" \
-	"\\^done,name=\"lpcharacter\",numchild=\"1\",value=\"$hex \\\\\".*\\\\\"\",type=\"char \\*\"" \
+	"\\^done,name=\"lpcharacter\",numchild=\"1\",value=\"$hex.*\",type=\"char \\*\"" \
  	"create local variable lpcharacter"
 
 mi_gdb_test "-var-create llong * llong" \
Index: gdb/testsuite/gdb.mi/mi2-var-cmd.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-var-cmd.exp,v
retrieving revision 1.11
diff -u -p -r1.11 mi2-var-cmd.exp
--- gdb/testsuite/gdb.mi/mi2-var-cmd.exp	28 Feb 2007 17:32:51 -0000	1.11
+++ gdb/testsuite/gdb.mi/mi2-var-cmd.exp	9 Mar 2007 02:16:14 -0000
@@ -87,7 +87,7 @@ mi_gdb_test "-var-create lcharacter * lc
 	"create local variable lcharacter "
 
 mi_gdb_test "-var-create lpcharacter * lpcharacter" \
-	"\\^done,name=\"lpcharacter\",numchild=\"1\",value=\"$hex \\\\\".*\\\\\"\",type=\"char \\*\"" \
+	"\\^done,name=\"lpcharacter\",numchild=\"1\",value=\"$hex.*\",type=\"char \\*\"" \
 	"create local variable lpcharacter"
 
 mi_gdb_test "-var-create llong * llong" \


-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2007-03-09  2:22 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-09 16:20 -var-create testsuite updates Daniel Jacobowitz
2007-02-09 20:48 ` Nick Roberts
2007-02-09 20:57   ` Daniel Jacobowitz
2007-02-11 21:43     ` Nick Roberts
2007-02-11 21:46       ` Daniel Jacobowitz
2007-02-12  6:18       ` Vladimir Prus
2007-02-12  9:30         ` Nick Roberts
2007-02-13 12:03           ` Daniel Jacobowitz
2007-02-15 20:55     ` -var-create testsuite updates [PATCH] Nick Roberts
2007-02-27 17:10       ` Daniel Jacobowitz
2007-03-09  1:00       ` Ulrich Weigand
2007-03-09  1:41         ` Nick Roberts
2007-03-09  2:22           ` Ulrich Weigand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox