Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] MI: Add value field to output of -var-create
@ 2007-01-02 10:07 Nick Roberts
  2007-01-04 20:20 ` Vladimir Prus
  2007-01-05 15:07 ` Daniel Jacobowitz
  0 siblings, 2 replies; 21+ messages in thread
From: Nick Roberts @ 2007-01-02 10:07 UTC (permalink / raw)
  To: gdb-patches


This patch just adds the value field to the output of var-create so that
the frontend doesn't need to issue another command to find out what it
is.

If approved, I'll change the tests and documentation accordingly.


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


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

	* mi/mi-cmd-var.c (mi_cmd_var_create): Add value field.


*** mi-cmd-var.c	08 Dec 2006 15:04:16 +1300	1.27
--- mi-cmd-var.c	27 Dec 2006 13:51:09 +1300	
*************** mi_cmd_var_create (char *command, char *
*** 125,131 ****
    if (var == NULL)
      error (_("mi_cmd_var_create: unable to create variable object"));
  
!   print_varobj (var, PRINT_NO_VALUES, 0 /* don't print expression */);
  
    do_cleanups (old_cleanups);
    return MI_CMD_DONE;
--- 125,131 ----
    if (var == NULL)
      error (_("mi_cmd_var_create: unable to create variable object"));
  
!   print_varobj (var, PRINT_ALL_VALUES, 0 /* don't print expression */);
  
    do_cleanups (old_cleanups);
    return MI_CMD_DONE;


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

* Re: [PATCH] MI: Add value field to output of -var-create
  2007-01-02 10:07 [PATCH] MI: Add value field to output of -var-create Nick Roberts
@ 2007-01-04 20:20 ` Vladimir Prus
  2007-01-04 23:22   ` Nick Roberts
  2007-01-05 15:07 ` Daniel Jacobowitz
  1 sibling, 1 reply; 21+ messages in thread
From: Vladimir Prus @ 2007-01-04 20:20 UTC (permalink / raw)
  To: Nick Roberts, gdb-patches

Nick Roberts wrote:

> 
> This patch just adds the value field to the output of var-create so that
> the frontend doesn't need to issue another command to find out what it
> is.
> 
> If approved, I'll change the tests and documentation accordingly.

I think this is a good change in general. However, the problem is that
a lot of tests hardcode the output from -var-create, and are broken with
this change. I think that instead of adding more hardcoding, we'd
need to replace all creation of varobjs with calls to mi_create_varobj.
Would you be willing to do that?

- Volodya





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

* Re: [PATCH] MI: Add value field to output of -var-create
  2007-01-04 20:20 ` Vladimir Prus
@ 2007-01-04 23:22   ` Nick Roberts
  2007-01-04 23:24     ` Daniel Jacobowitz
  2007-01-05  7:40     ` Vladimir Prus
  0 siblings, 2 replies; 21+ messages in thread
From: Nick Roberts @ 2007-01-04 23:22 UTC (permalink / raw)
  To: Vladimir Prus; +Cc: gdb-patches

 > I think this is a good change in general. However, the problem is that
 > a lot of tests hardcode the output from -var-create, and are broken with
 > this change. I think that instead of adding more hardcoding, we'd
 > need to replace all creation of varobjs with calls to mi_create_varobj.
 > Would you be willing to do that?

It seems unfortunate to me that the output from -var-create gets tested so many
times but Daniel has just said that mi_gdb_test should really should used even
if you don't care about the result.  Real tests for -var-create e.g in
mi-var-cmd.exp need to be looked at more carefully (some test when -var-create
fails) but, sure, mi_create_varobj could be used when you don't care about the
result.

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


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

* Re: [PATCH] MI: Add value field to output of -var-create
  2007-01-04 23:22   ` Nick Roberts
@ 2007-01-04 23:24     ` Daniel Jacobowitz
  2007-01-05  7:40     ` Vladimir Prus
  1 sibling, 0 replies; 21+ messages in thread
From: Daniel Jacobowitz @ 2007-01-04 23:24 UTC (permalink / raw)
  To: Nick Roberts; +Cc: Vladimir Prus, gdb-patches

On Fri, Jan 05, 2007 at 12:22:15PM +1300, Nick Roberts wrote:
>  > I think this is a good change in general. However, the problem is that
>  > a lot of tests hardcode the output from -var-create, and are broken with
>  > this change. I think that instead of adding more hardcoding, we'd
>  > need to replace all creation of varobjs with calls to mi_create_varobj.
>  > Would you be willing to do that?
> 
> It seems unfortunate to me that the output from -var-create gets tested so many
> times but Daniel has just said that mi_gdb_test should really should used even
> if you don't care about the result.

The reason for that advice was the same problem I found with your test;
mi_gdb_test knows how to handle unexpected output and is always careful
to consume a prompt.  If you have a helper function that does something
sufficiently carefully without making it a test, that's fine too!

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: [PATCH] MI: Add value field to output of -var-create
  2007-01-04 23:22   ` Nick Roberts
  2007-01-04 23:24     ` Daniel Jacobowitz
@ 2007-01-05  7:40     ` Vladimir Prus
  1 sibling, 0 replies; 21+ messages in thread
From: Vladimir Prus @ 2007-01-05  7:40 UTC (permalink / raw)
  To: Nick Roberts; +Cc: gdb-patches

On Friday 05 January 2007 02:22, Nick Roberts wrote:
>  > I think this is a good change in general. However, the problem is that
>  > a lot of tests hardcode the output from -var-create, and are broken with
>  > this change. I think that instead of adding more hardcoding, we'd
>  > need to replace all creation of varobjs with calls to mi_create_varobj.
>  > Would you be willing to do that?
> 
> It seems unfortunate to me that the output from -var-create gets tested so many
> times but Daniel has just said that mi_gdb_test should really should used even
> if you don't care about the result.  

FWIW, mi_create_varobj does use mi_gdb_test.

> Real tests for -var-create e.g in 
> mi-var-cmd.exp need to be looked at more carefully (some test when -var-create
> fails) but, sure, mi_create_varobj could be used when you don't care about the
> result.

Good. Yes, it's unfortunate that the work on updating tests far exceeds the work
to make the patch itself, but at this point we can only try to avoid this in future ;-)

- Volodya


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

* Re: [PATCH] MI: Add value field to output of -var-create
  2007-01-02 10:07 [PATCH] MI: Add value field to output of -var-create Nick Roberts
  2007-01-04 20:20 ` Vladimir Prus
@ 2007-01-05 15:07 ` Daniel Jacobowitz
  2007-01-05 21:30   ` Nick Roberts
  2007-01-18  9:09   ` Nick Roberts
  1 sibling, 2 replies; 21+ messages in thread
From: Daniel Jacobowitz @ 2007-01-05 15:07 UTC (permalink / raw)
  To: Nick Roberts; +Cc: gdb-patches

On Tue, Jan 02, 2007 at 11:07:34PM +1300, Nick Roberts wrote:
> 
> This patch just adds the value field to the output of var-create so that
> the frontend doesn't need to issue another command to find out what it
> is.
> 
> If approved, I'll change the tests and documentation accordingly.

Seems fine to me, after we work out what to do with the testsuite. I
went to check whether this should be PRINT_ALL_VALUES or
PRINT_SIMPLE_VALUES but it seems fine the way you've got it - I wish
I could remember the rational for PRINT_SIMPLE_VALUES properly.

One alternative that does not affect the testsuite would be to add
an --all-values option to -var-create.

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: [PATCH] MI: Add value field to output of -var-create
  2007-01-05 15:07 ` Daniel Jacobowitz
@ 2007-01-05 21:30   ` Nick Roberts
  2007-01-07 23:32     ` Daniel Jacobowitz
  2007-01-18  9:09   ` Nick Roberts
  1 sibling, 1 reply; 21+ messages in thread
From: Nick Roberts @ 2007-01-05 21:30 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

 > Seems fine to me, after we work out what to do with the testsuite. I
 > went to check whether this should be PRINT_ALL_VALUES or
 > PRINT_SIMPLE_VALUES but it seems fine the way you've got it - I wish
 > I could remember the rational for PRINT_SIMPLE_VALUES properly.

I think it was a diplomatic solution to a technical problem.
PRINT_SIMPLE_VALUES only makes sense to me for -stack-list-locals.  Even
this case will be unimportant when "-var-list --locals" is implemented.

 > One alternative that does not affect the testsuite would be to add
 > an --all-values option to -var-create.

Ah!, the Emacs solution; a switch for everything.  I don't like it.  This
would mean that the frontend end would have to work out which versions of
GDB have this option and which don't.

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


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

* Re: [PATCH] MI: Add value field to output of -var-create
  2007-01-05 21:30   ` Nick Roberts
@ 2007-01-07 23:32     ` Daniel Jacobowitz
  0 siblings, 0 replies; 21+ messages in thread
From: Daniel Jacobowitz @ 2007-01-07 23:32 UTC (permalink / raw)
  To: Nick Roberts; +Cc: gdb-patches

On Sat, Jan 06, 2007 at 10:30:02AM +1300, Nick Roberts wrote:
>  > One alternative that does not affect the testsuite would be to add
>  > an --all-values option to -var-create.
> 
> Ah!, the Emacs solution; a switch for everything.  I don't like it.  This
> would mean that the frontend end would have to work out which versions of
> GDB have this option and which don't.

That's good enough reasoning for me.

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: [PATCH] MI: Add value field to output of -var-create
  2007-01-05 15:07 ` Daniel Jacobowitz
  2007-01-05 21:30   ` Nick Roberts
@ 2007-01-18  9:09   ` Nick Roberts
  2007-01-20 19:09     ` Daniel Jacobowitz
  1 sibling, 1 reply; 21+ messages in thread
From: Nick Roberts @ 2007-01-18  9:09 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

[-- Attachment #1: message body and .signature --]
[-- Type: text/plain, Size: 2092 bytes --]

 > > This patch just adds the value field to the output of var-create so that
 > > the frontend doesn't need to issue another command to find out what it
 > > is.
 > > 
 > > If approved, I'll change the tests and documentation accordingly.
 > 
 > Seems fine to me, after we work out what to do with the testsuite. I
 > went to check whether this should be PRINT_ALL_VALUES or
 > PRINT_SIMPLE_VALUES but it seems fine the way you've got it - I wish
 > I could remember the rational for PRINT_SIMPLE_VALUES properly.

OK, I've done this now with all tests changed.  I've used Vladimir's
mi_create_varobj as much as possible.  The three places where I've kept
-var-create are:

1) Where failure of -var-create is being tested.
2) Where a command token is used.
3) Where a name isn't specified for the variable object ("-" used).

I get the same test results before and after my change.

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


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

	* mi/mi-cmd-var.c (mi_cmd_var_create): Add value field.


2007-01-18  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, lib/mi-support.exp:
	Update tests for -var-create to include value field.


*** mi-cmd-var.c	10 Jan 2007 11:56:57 +1300	1.28
--- mi-cmd-var.c	18 Jan 2007 17:26:48 +1300	
*************** mi_cmd_var_create (char *command, char *
*** 125,131 ****
    if (var == NULL)
      error (_("mi_cmd_var_create: unable to create variable object"));
  
!   print_varobj (var, PRINT_NO_VALUES, 0 /* don't print expression */);
  
    do_cleanups (old_cleanups);
    return MI_CMD_DONE;
--- 125,131 ----
    if (var == NULL)
      error (_("mi_cmd_var_create: unable to create variable object"));
  
!   print_varobj (var, PRINT_ALL_VALUES, 0 /* don't print expression */);
  
    do_cleanups (old_cleanups);
    return MI_CMD_DONE;



[-- Attachment #2: Update tests for -var-create to include value field. --]
[-- Type: application/octet-stream, Size: 47307 bytes --]

Index: gdb.mi/mi-var-block.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-block.exp,v
retrieving revision 1.13
diff -c -p -r1.13 mi-var-block.exp
*** gdb.mi/mi-var-block.exp	9 Jan 2007 17:59:13 -0000	1.13
--- gdb.mi/mi-var-block.exp	18 Jan 2007 08:48:57 -0000
*************** mi_runto do_block_tests
*** 44,52 ****
  
  # Test: c_variable-3.2
  # Desc: create cb and foo
! mi_gdb_test "-var-create cb * cb" \
! 	"\\^done,name=\"cb\",numchild=\"0\",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\"" \
--- 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\"" \
*************** mi_gdb_test "-var-delete foo" \
*** 66,74 ****
  
  # Test: c_variable-3.3
  # Desc: create foo
! mi_gdb_test "-var-create foo * foo" \
! 	"\\^done,name=\"foo\",numchild=\"0\",type=\"int\"" \
! 	"create local variable foo"
  
  # step to "foo2 = 123;"
  mi_step_to "do_block_tests" "" "var-cmd.c" \
--- 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" \
*************** mi_step_to "do_block_tests" "" "var-cmd.
*** 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\",type=\"int\"" \
! 	"create local variable inner_foo"
  
  # step to "foo2 = 0;"
  mi_step_to "do_block_tests" "" "var-cmd.c" \
--- 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" \
*************** mi_step_to "do_block_tests" "" "var-cmd.
*** 99,107 ****
  
  # Test: c_variable-3.6
  # Desc: create foo2
! mi_gdb_test "-var-create foo2 * foo2" \
! 	"\\^done,name=\"foo2\",numchild=\"0\",type=\"int\"" \
! 	"create local variable foo2"
  
  # Test: c_variable-3.7
  # Desc: check that outer foo in scope and inner foo out of scope
--- 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
Index: gdb.mi/mi2-var-block.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-var-block.exp,v
retrieving revision 1.5
diff -c -p -r1.5 mi2-var-block.exp
*** gdb.mi/mi2-var-block.exp	9 Jan 2007 17:59:13 -0000	1.5
--- gdb.mi/mi2-var-block.exp	18 Jan 2007 08:48:57 -0000
*************** mi_runto do_block_tests
*** 45,53 ****
  
  # Test: c_variable-3.2
  # Desc: create cb and foo
! mi_gdb_test "-var-create cb * cb" \
! 	"\\^done,name=\"cb\",numchild=\"0\",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\"" \
--- 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\"" \
*************** mi_gdb_test "-var-delete foo" \
*** 67,75 ****
  
  # Test: c_variable-3.3
  # Desc: create foo
! mi_gdb_test "-var-create foo * foo" \
! 	"\\^done,name=\"foo\",numchild=\"0\",type=\"int\"" \
! 	"create local variable foo"
  
  # step to "foo2 = 123;"
  mi_step_to "do_block_tests" "" "var-cmd.c" \
--- 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" \
*************** mi_step_to "do_block_tests" "" "var-cmd.
*** 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\",type=\"int\"" \
! 	"create local variable inner_foo"
  
  # step to "foo2 = 0;"
  mi_step_to "do_block_tests" "" "var-cmd.c" \
--- 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" \
*************** mi_step_to "do_block_tests" "" "var-cmd.
*** 100,108 ****
  
  # Test: c_variable-3.6
  # Desc: create foo2
! mi_gdb_test "-var-create foo2 * foo2" \
! 	"\\^done,name=\"foo2\",numchild=\"0\",type=\"int\"" \
! 	"create local variable foo2"
  
  # Test: c_variable-3.7
  # Desc: check that outer foo in scope and inner foo out of scope
--- 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
Index: gdb.mi/mi-var-child.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-child.exp,v
retrieving revision 1.21
diff -c -p -r1.21 mi-var-child.exp
*** gdb.mi/mi-var-child.exp	10 Aug 2006 05:27:21 -0000	1.21
--- gdb.mi/mi-var-child.exp	18 Jan 2007 08:49:01 -0000
*************** mi_execute_to "exec-next" "end-stepping-
*** 55,63 ****
  
  # 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"
  
  # Test: c_variable-4.3
  # Desc: children of struct_declarations
--- 55,62 ----
  
  # 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
*************** mi_step_to do_children_tests {} ".*${src
*** 563,571 ****
  
  # Test: c_variable-4.81
  # Desc: create local variable "weird"
! mi_gdb_test "-var-create weird * weird" \
! 	"\\^done,name=\"weird\",numchild=\"11\",type=\"weird_struct \\*\"" \
! 	"create local variable weird"
  
  # Test: c_variable-4.82
  # Desc: children of weird
--- 562,568 ----
  
  # 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
*************** mi_gdb_test "-var-info-num-children weir
*** 627,635 ****
  
  # 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\",type=\"int \\*\\*\"" \
! 	"create local variable weird->int_ptr_ptr"
  
  # Test: c_variable-4.91
  # Desc: children of weird->int_ptr_ptr
--- 624,631 ----
  
  # 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
*************** mi_execute_to "exec-step 43" "end-steppi
*** 893,901 ****
  
  # 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\",type=\"char \\*\\*\\*\\*\"" \
! 	"create local variable  psnp->char_ptr"
  
  # Test: c_variable-5.11
  # Desc: children of psnp->char_ptr
--- 889,896 ----
  
  # 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
*************** mi_gdb_test "-var-info-num-children psnp
*** 966,974 ****
  
  # 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\",type=\"long int \\*\\*\\*\\*\"" \
! 	"create local variable  psnp->long_ptr"
  
  # Test: c_variable-5.20
  # Desc: children of psnp->long_ptr
--- 961,968 ----
  
  # 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
*************** mi_gdb_test "-var-info-num-children psnp
*** 1033,1041 ****
  
  # Test: c_variable-5.30
  # Desc: create psnp->ptrs
! mi_gdb_test "-var-create  psnp->ptrs *  psnp->ptrs" \
! 	"\\^done,name=\"psnp->ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"" \
! 	"create local variable  psnp->ptrs"
  
  # Test: c_variable-5.31
  # Desc: children of psnp->ptrs
--- 1027,1033 ----
  
  # 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
*************** mi_step_to do_children_tests {} ".*${src
*** 1210,1216 ****
  # 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=\"true\",type_changed=\"false\"\}\\\]" \
  	"update all vars psnp->next->long_ptr (and 1.long_ptr) changed"
  clear_xfail *-*-*
  
--- 1202,1208 ----
  # 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 *-*-*
  
Index: gdb.mi/mi2-var-child.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-var-child.exp,v
retrieving revision 1.4
diff -c -p -r1.4 mi2-var-child.exp
*** gdb.mi/mi2-var-child.exp	10 Aug 2006 05:27:21 -0000	1.4
--- gdb.mi/mi2-var-child.exp	18 Jan 2007 08:49:04 -0000
*************** mi_runto do_children_tests
*** 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\",type=\"struct _struct_decl\"" \
! 	"create local variable struct_declarations"
  
  # Test: c_variable-4.3
  # Desc: children of struct_declarations
--- 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
*************** mi_step_to do_children_tests {} {.*var-c
*** 559,567 ****
  
  # Test: c_variable-4.81
  # Desc: create local variable "weird"
! mi_gdb_test "-var-create weird * weird" \
! 	"\\^done,name=\"weird\",numchild=\"11\",type=\"weird_struct \\*\"" \
! 	"create local variable weird"
  
  # Test: c_variable-4.82
  # Desc: children of weird
--- 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
*************** mi_gdb_test "-var-info-num-children weir
*** 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\",type=\"int \\*\\*\"" \
! 	"create local variable weird->int_ptr_ptr"
  
  # Test: c_variable-4.91
  # Desc: children of weird->int_ptr_ptr
--- 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
*************** mi_execute_to "exec-step 43" "end-steppi
*** 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\",type=\"char \\*\\*\\*\\*\"" \
! 	"create local variable  psnp->char_ptr"
  
  # Test: c_variable-5.11
  # Desc: children of psnp->char_ptr
--- 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
*************** mi_gdb_test "-var-info-num-children psnp
*** 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\",type=\"long int \\*\\*\\*\\*\"" \
! 	"create local variable  psnp->long_ptr"
  
  # Test: c_variable-5.20
  # Desc: children of psnp->long_ptr
--- 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
*************** mi_gdb_test "-var-info-num-children psnp
*** 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\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"" \
! 	"create local variable  psnp->ptrs"
  
  # Test: c_variable-5.31
  # Desc: children of psnp->ptrs
--- 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
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.4
diff -c -p -r1.4 mi-var-child-f.exp
*** gdb.mi/mi-var-child-f.exp	12 Jan 2007 11:36:20 -0000	1.4
--- gdb.mi/mi-var-child-f.exp	18 Jan 2007 08:49:04 -0000
*************** mi_gdb_load ${binfile}
*** 38,46 ****
  
  mi_runto MAIN__
  
! mi_gdb_test "-var-create array * array" \
!     "\\^done,name=\"array\",numchild=\"3\",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\\)\"\}\\\]" \
--- 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\\)\"\}\\\]" \
Index: gdb.mi/mi-var-cmd.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-cmd.exp,v
retrieving revision 1.24
diff -c -p -r1.24 mi-var-cmd.exp
*** gdb.mi/mi-var-cmd.exp	9 Jan 2007 17:59:13 -0000	1.24
--- gdb.mi/mi-var-cmd.exp	18 Jan 2007 08:49:06 -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\",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,149 ****
  # Test: c_variable-1.4
  # Desc: create local variables
  
! mi_gdb_test "-var-create linteger * linteger" \
! 	"\\^done,name=\"linteger\",numchild=\"0\",type=\"int\"" \
! 	"create local variable linteger"
  
! mi_gdb_test "-var-create lpinteger * lpinteger" \
! 	"\\^done,name=\"lpinteger\",numchild=\"1\",type=\"int \\*\"" \
! 	"create local variable lpinteger"
! 
! mi_gdb_test "-var-create lcharacter * lcharacter" \
! 	"\\^done,name=\"lcharacter\",numchild=\"0\",type=\"char\"" \
! 	"create local variablelcharacter "
! 
! mi_gdb_test "-var-create lpcharacter * lpcharacter" \
! 	"\\^done,name=\"lpcharacter\",numchild=\"1\",type=\"char \\*\"" \
! 	"create local variable lpcharacter"
! 
! mi_gdb_test "-var-create llong * llong" \
! 	"\\^done,name=\"llong\",numchild=\"0\",type=\"long int\"" \
! 	"create local variable llong"
! 
! mi_gdb_test "-var-create lplong * lplong" \
! 	"\\^done,name=\"lplong\",numchild=\"1\",type=\"long int \\*\"" \
! 	"create local variable lplong"
! 
! mi_gdb_test "-var-create lfloat * lfloat" \
! 	"\\^done,name=\"lfloat\",numchild=\"0\",type=\"float\"" \
! 	"create local variable lfloat"
! 
! mi_gdb_test "-var-create lpfloat * lpfloat" \
! 	"\\^done,name=\"lpfloat\",numchild=\"1\",type=\"float \\*\"" \
! 	"create local variable lpfloat"
! 
! mi_gdb_test "-var-create ldouble * ldouble" \
! 	"\\^done,name=\"ldouble\",numchild=\"0\",type=\"double\"" \
! 	"create local variable ldouble"
! 
! mi_gdb_test "-var-create lpdouble * lpdouble" \
! 	"\\^done,name=\"lpdouble\",numchild=\"1\",type=\"double \\*\"" \
! 	"create local variable lpdouble"
! 
! mi_gdb_test "-var-create lsimple * lsimple" \
! 	"\\^done,name=\"lsimple\",numchild=\"6\",type=\"struct _simple_struct\"" \
! 	"create local variable lsimple"
! 
! mi_gdb_test "-var-create lpsimple * lpsimple" \
! 	"\\^done,name=\"lpsimple\",numchild=\"6\",type=\"struct _simple_struct \\*\"" \
! 	"create local variable lpsimple"
! 
! mi_gdb_test "-var-create func * func" \
! 	"\\^done,name=\"func\",numchild=\"0\",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\",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\",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\",type=\"int\"" \
! 	"create lsimple->integer"
! 
  
  # Test: c_variable-1.9
  # Desc: create type name
--- 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
*************** mi_gdb_test "-var-update *" \
*** 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\",type=\"int \\*\"" \
! 	"create global variable array_ptr"
  
  mi_gdb_test "-var-assign array_ptr array2" \
  	"\\^done,value=\"$hex\"" \
--- 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\"" \
*************** mi_continue_to 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\",type=\"int\"" \
! 	"create i"
! 
! mi_gdb_test "-var-create l * l" \
! 	"\\^done,name=\"l\",numchild=\"1\",type=\"long int \\*\"" \
! 	"create l"
  
  # Test: c_variable-2.11
  # Desc: create do_locals_tests local in 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
*************** mi_gdb_test "-var-delete l" \
*** 575,581 ****
  mi_continue_to do_special_tests
  
  mi_gdb_test "-var-create selected_a @ a" \
!   {\^done,name="selected_a",numchild="0",type="int"} \
    "create selected_a"
  
  mi_continue_to incr_a
--- 536,542 ----
  mi_continue_to do_special_tests
  
  mi_gdb_test "-var-create selected_a @ a" \
!   {\^done,name="selected_a",numchild="0",value=\".*\",type="int"} \
    "create selected_a"
  
  mi_continue_to incr_a
*************** mi_gdb_test "-var-update selected_a" \
*** 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",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
--- 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
*************** mi_gdb_test "kill" \
*** 620,628 ****
      {&"kill\\n".*\^done} \
      "kill program before endvar"
  
! mi_gdb_test "-var-create endvar * _end" \
!     {(\^done,name="endvar",numchild="0",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.
--- 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.
Index: gdb.mi/mi2-var-cmd.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-var-cmd.exp,v
retrieving revision 1.8
diff -c -p -r1.8 mi2-var-cmd.exp
*** gdb.mi/mi2-var-cmd.exp	9 Jan 2007 17:59:13 -0000	1.8
--- gdb.mi/mi2-var-cmd.exp	18 Jan 2007 08:49:07 -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\",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,149 ****
  # Test: c_variable-1.4
  # Desc: create local variables
  
! mi_gdb_test "-var-create linteger * linteger" \
! 	"\\^done,name=\"linteger\",numchild=\"0\",type=\"int\"" \
! 	"create local variable linteger"
  
! mi_gdb_test "-var-create lpinteger * lpinteger" \
! 	"\\^done,name=\"lpinteger\",numchild=\"1\",type=\"int \\*\"" \
! 	"create local variable lpinteger"
! 
! mi_gdb_test "-var-create lcharacter * lcharacter" \
! 	"\\^done,name=\"lcharacter\",numchild=\"0\",type=\"char\"" \
! 	"create local variablelcharacter "
! 
! mi_gdb_test "-var-create lpcharacter * lpcharacter" \
! 	"\\^done,name=\"lpcharacter\",numchild=\"1\",type=\"char \\*\"" \
! 	"create local variable lpcharacter"
! 
! mi_gdb_test "-var-create llong * llong" \
! 	"\\^done,name=\"llong\",numchild=\"0\",type=\"long int\"" \
! 	"create local variable llong"
! 
! mi_gdb_test "-var-create lplong * lplong" \
! 	"\\^done,name=\"lplong\",numchild=\"1\",type=\"long int \\*\"" \
! 	"create local variable lplong"
! 
! mi_gdb_test "-var-create lfloat * lfloat" \
! 	"\\^done,name=\"lfloat\",numchild=\"0\",type=\"float\"" \
! 	"create local variable lfloat"
! 
! mi_gdb_test "-var-create lpfloat * lpfloat" \
! 	"\\^done,name=\"lpfloat\",numchild=\"1\",type=\"float \\*\"" \
! 	"create local variable lpfloat"
! 
! mi_gdb_test "-var-create ldouble * ldouble" \
! 	"\\^done,name=\"ldouble\",numchild=\"0\",type=\"double\"" \
! 	"create local variable ldouble"
! 
! mi_gdb_test "-var-create lpdouble * lpdouble" \
! 	"\\^done,name=\"lpdouble\",numchild=\"1\",type=\"double \\*\"" \
! 	"create local variable lpdouble"
! 
! mi_gdb_test "-var-create lsimple * lsimple" \
! 	"\\^done,name=\"lsimple\",numchild=\"6\",type=\"struct _simple_struct\"" \
! 	"create local variable lsimple"
! 
! mi_gdb_test "-var-create lpsimple * lpsimple" \
! 	"\\^done,name=\"lpsimple\",numchild=\"6\",type=\"struct _simple_struct \\*\"" \
! 	"create local variable lpsimple"
! 
! mi_gdb_test "-var-create func * func" \
! 	"\\^done,name=\"func\",numchild=\"0\",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\",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\",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\",type=\"int\"" \
! 	"create lsimple->integer"
! 
  
  # Test: c_variable-1.9
  # Desc: create type name
--- 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
*************** mi_continue_to "subroutine1"
*** 397,409 ****
  
  # 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\",type=\"int\"" \
! 	"create i"
! 
! mi_gdb_test "-var-create l * l" \
! 	"\\^done,name=\"l\",numchild=\"1\",type=\"long int \\*\"" \
! 	"create l"
  
  # Test: c_variable-2.11
  # Desc: create do_locals_tests local in subroutine1
--- 364,372 ----
  
  # 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
*************** mi_gdb_test "-var-delete l" \
*** 538,544 ****
  mi_continue_to do_special_tests
  
  mi_gdb_test "-var-create selected_a @ a" \
!   {\^done,name="selected_a",numchild="0",type="int"} \
    "create selected_a"
  
  mi_continue_to incr_a
--- 501,507 ----
  mi_continue_to do_special_tests
  
  mi_gdb_test "-var-create selected_a @ a" \
!   {\^done,name="selected_a",numchild="0",value=\".*\",type="int"} \
    "create selected_a"
  
  mi_continue_to incr_a
Index: gdb.mi/mi-var-display.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-display.exp,v
retrieving revision 1.16
diff -c -p -r1.16 mi-var-display.exp
*** gdb.mi/mi-var-display.exp	9 Jan 2007 17:59:13 -0000	1.16
--- gdb.mi/mi-var-display.exp	18 Jan 2007 08:49:08 -0000
*************** gdb_expect {
*** 65,73 ****
  
  # Test: c_variable-6.1
  # Desc: create variable bar
! mi_gdb_test "-var-create bar * bar" \
! 	"\\^done,name=\"bar\",numchild=\"0\",type=\"int\"" \
! 	"create local variable bar"
  
  # Test: c_variable-6.2
  # Desc: type of variable bar
--- 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
*************** mi_gdb_test "-var-delete bar" \
*** 119,127 ****
  
  # Test: c_variable-6.11
  # Desc: create variable foo
! mi_gdb_test "-var-create foo * foo" \
! 	"\\^done,name=\"foo\",numchild=\"1\",type=\"int \\*\"" \
! 	"create local variable foo"
  
  # Test: c_variable-6.12
  # Desc: type of variable foo
--- 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
*************** mi_gdb_test "-var-delete foo" \
*** 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\",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 \{\\.\\.\\.\}\"\}\\\]" \
--- 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 \{\\.\\.\\.\}\"\}\\\]" \
*************** gdb_expect {
*** 344,352 ****
  
  # Test: c_variable-7.10
  # Desc: create union u
! mi_gdb_test "-var-create u * u" \
! 	"\\^done,name=\"u\",numchild=\"2\",type=\"union named_union\"" \
! 	"create local variable u"
  
  # Test: c_variable-7.11
  # Desc: value of u
--- 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
*************** mi_gdb_test "-var-list-children u" \
*** 380,388 ****
  
  # Test: c_variable-7.20
  # Desc: create anonu
! mi_gdb_test "-var-create anonu * anonu" \
! 	"\\^done,name=\"anonu\",numchild=\"3\",type=\"union \{\\.\\.\\.\}\"" \
! 	"create local variable anonu"
  
  # Test: c_variable-7.21
  # Desc: value of anonu
--- 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
*************** mi_gdb_test "-var-list-children anonu" \
*** 416,425 ****
  
  # Test: c_variable-7.30
  # Desc: create struct s
! mi_gdb_test "-var-create s * s" \
! 	"\\^done,name=\"s\",numchild=\"6\",type=\"struct _simple_struct\"" \
! 	"create local variable s"
! 
  
  # Test: c_variable-7.31
  # Desc: value of s
--- 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
*************** mi_gdb_test "-var-list-children s" \
*** 454,462 ****
  
  # Test: c_variable-7.40
  # Desc: create anons
! mi_gdb_test "-var-create anons * anons" \
! 	"\\^done,name=\"anons\",numchild=\"3\",type=\"struct \{\\.\\.\\.\}\"" \
! 	"create local variable anons"
  
  # Test: c_variable-7.41
  # Desc: value of anons
--- 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
*************** mi_gdb_test "-var-list-children anons" \
*** 491,499 ****
  
  # Test: c_variable-7.50
  # Desc: create enum e
! mi_gdb_test "-var-create e * e" \
! 	"\\^done,name=\"e\",numchild=\"0\",type=\"enum foo\"" \
! 	"create local variable e"
  
  setup_xfail "*-*-*"
  # Test: c_variable-7.51
--- 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
*************** mi_gdb_test "-var-list-children e" \
*** 529,537 ****
  
  # Test: c_variable-7.60
  # Desc: create anone
! mi_gdb_test "-var-create anone * anone" \
! 	"\\^done,name=\"anone\",numchild=\"0\",type=\"enum \{\\.\\.\\.\}\"" \
! 	"create local variable anone"
  
  setup_xfail "*-*-*"
  # Test: c_variable-7.61
--- 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
*************** gdb_expect {
*** 610,621 ****
  
  # Test: c_variable-7.81
  # Desc: Create variables in different scopes
! mi_gdb_test "-var-create a1 * a" \
! 	"\\^done,name=\"a1\",numchild=\"0\",type=\"char\"" \
! 	"create local variable a1"
  
  mi_gdb_test "-var-create a2 $fp a" \
! 	"\\^done,name=\"a2\",numchild=\"0\",type=\"int\"" \
  	"create variable a2 in different scope"
  
  #gdbtk_test c_variable-7.81 {create variables in different scopes} {
--- 591,600 ----
  
  # 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\"" \
  	"create variable a2 in different scope"
  
  #gdbtk_test c_variable-7.81 {create variables in different scopes} {
Index: gdb.mi/mi2-var-display.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-var-display.exp,v
retrieving revision 1.8
diff -c -p -r1.8 mi2-var-display.exp
*** gdb.mi/mi2-var-display.exp	9 Jan 2007 17:59:13 -0000	1.8
--- gdb.mi/mi2-var-display.exp	18 Jan 2007 08:49:09 -0000
*************** gdb_expect {
*** 65,73 ****
  
  # Test: c_variable-6.1
  # Desc: create variable bar
! mi_gdb_test "-var-create bar * bar" \
! 	"\\^done,name=\"bar\",numchild=\"0\",type=\"int\"" \
! 	"create local variable bar"
  
  # Test: c_variable-6.2
  # Desc: type of variable bar
--- 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
*************** mi_gdb_test "-var-delete bar" \
*** 119,127 ****
  
  # Test: c_variable-6.11
  # Desc: create variable foo
! mi_gdb_test "-var-create foo * foo" \
! 	"\\^done,name=\"foo\",numchild=\"1\",type=\"int \\*\"" \
! 	"create local variable foo"
  
  # Test: c_variable-6.12
  # Desc: type of variable foo
--- 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
*************** mi_gdb_test "-var-delete foo" \
*** 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\",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 \{\\.\\.\\.\}\"\}\\\]" \
--- 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 \{\\.\\.\\.\}\"\}\\\]" \
*************** gdb_expect {
*** 344,352 ****
  
  # Test: c_variable-7.10
  # Desc: create union u
! mi_gdb_test "-var-create u * u" \
! 	"\\^done,name=\"u\",numchild=\"2\",type=\"union named_union\"" \
! 	"create local variable u"
  
  # Test: c_variable-7.11
  # Desc: value of u
--- 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
*************** mi_gdb_test "-var-list-children u" \
*** 380,388 ****
  
  # Test: c_variable-7.20
  # Desc: create anonu
! mi_gdb_test "-var-create anonu * anonu" \
! 	"\\^done,name=\"anonu\",numchild=\"3\",type=\"union \{\\.\\.\\.\}\"" \
! 	"create local variable anonu"
  
  # Test: c_variable-7.21
  # Desc: value of anonu
--- 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
*************** mi_gdb_test "-var-list-children anonu" \
*** 416,425 ****
  
  # Test: c_variable-7.30
  # Desc: create struct s
! mi_gdb_test "-var-create s * s" \
! 	"\\^done,name=\"s\",numchild=\"6\",type=\"struct _simple_struct\"" \
! 	"create local variable s"
! 
  
  # Test: c_variable-7.31
  # Desc: value of s
--- 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
*************** mi_gdb_test "-var-list-children s" \
*** 454,462 ****
  
  # Test: c_variable-7.40
  # Desc: create anons
! mi_gdb_test "-var-create anons * anons" \
! 	"\\^done,name=\"anons\",numchild=\"3\",type=\"struct \{\\.\\.\\.\}\"" \
! 	"create local variable anons"
  
  # Test: c_variable-7.41
  # Desc: value of anons
--- 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
*************** mi_gdb_test "-var-list-children anons" \
*** 491,499 ****
  
  # Test: c_variable-7.50
  # Desc: create enum e
! mi_gdb_test "-var-create e * e" \
! 	"\\^done,name=\"e\",numchild=\"0\",type=\"enum foo\"" \
! 	"create local variable e"
  
  setup_xfail "*-*-*"
  # Test: c_variable-7.51
--- 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
*************** mi_gdb_test "-var-list-children e" \
*** 529,537 ****
  
  # Test: c_variable-7.60
  # Desc: create anone
! mi_gdb_test "-var-create anone * anone" \
! 	"\\^done,name=\"anone\",numchild=\"0\",type=\"enum \{\\.\\.\\.\}\"" \
! 	"create local variable anone"
  
  setup_xfail "*-*-*"
  # Test: c_variable-7.61
--- 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
*************** gdb_expect {
*** 610,621 ****
  
  # Test: c_variable-7.81
  # Desc: Create variables in different scopes
! mi_gdb_test "-var-create a1 * a" \
! 	"\\^done,name=\"a1\",numchild=\"0\",type=\"char\"" \
! 	"create local variable a1"
  
  mi_gdb_test "-var-create a2 $fp a" \
! 	"\\^done,name=\"a2\",numchild=\"0\",type=\"int\"" \
  	"create variable a2 in different scope"
  
  #gdbtk_test c_variable-7.81 {create variables in different scopes} {
--- 591,600 ----
  
  # 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\"" \
  	"create variable a2 in different scope"
  
  #gdbtk_test c_variable-7.81 {create variables in different scopes} {
Index: lib/mi-support.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/mi-support.exp,v
retrieving revision 1.39
diff -c -p -r1.39 mi-support.exp
*** lib/mi-support.exp	9 Jan 2007 17:59:14 -0000	1.39
--- lib/mi-support.exp	18 Jan 2007 08:49:12 -0000
*************** proc mi0_continue_to { bkptno func args 
*** 1019,1025 ****
  # Name cannot be "-".
  proc mi_create_varobj { name expression testname } {
      mi_gdb_test "-var-create $name * $expression" \
!         "\\^done,name=\"$name\",numchild=\"\[0-9\]+\",type=.*" \
          $testname
  }
  
--- 1019,1025 ----
  # Name cannot be "-".
  proc mi_create_varobj { name expression testname } {
      mi_gdb_test "-var-create $name * $expression" \
!         "\\^done,name=\"$name\",numchild=\"\[0-9\]+\",value=\".*\",type=.*" \
          $testname
  }
  

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

* Re: [PATCH] MI: Add value field to output of -var-create
  2007-01-18  9:09   ` Nick Roberts
@ 2007-01-20 19:09     ` Daniel Jacobowitz
  2007-01-20 21:53       ` Nick Roberts
  0 siblings, 1 reply; 21+ messages in thread
From: Daniel Jacobowitz @ 2007-01-20 19:09 UTC (permalink / raw)
  To: Nick Roberts; +Cc: gdb-patches

On Thu, Jan 18, 2007 at 10:08:39PM +1300, Nick Roberts wrote:
Content-Description: message body and .signature
>  > > This patch just adds the value field to the output of var-create so that
>  > > the frontend doesn't need to issue another command to find out what it
>  > > is.
>  > > 
>  > > If approved, I'll change the tests and documentation accordingly.
>  > 
>  > Seems fine to me, after we work out what to do with the testsuite. I
>  > went to check whether this should be PRINT_ALL_VALUES or
>  > PRINT_SIMPLE_VALUES but it seems fine the way you've got it - I wish
>  > I could remember the rational for PRINT_SIMPLE_VALUES properly.
> 
> OK, I've done this now with all tests changed.  I've used Vladimir's
> mi_create_varobj as much as possible.  The three places where I've kept
> -var-create are:
> 
> 1) Where failure of -var-create is being tested.
> 2) Where a command token is used.
> 3) Where a name isn't specified for the variable object ("-" used).
> 
> I get the same test results before and after my change.

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

  # 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")?

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: [PATCH] MI: Add value field to output of -var-create
  2007-01-20 19:09     ` Daniel Jacobowitz
@ 2007-01-20 21:53       ` Nick Roberts
  2007-02-03  4:54         ` Nick Roberts
  0 siblings, 1 reply; 21+ messages in thread
From: Nick Roberts @ 2007-01-20 21:53 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

 > 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" \


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

* Re: [PATCH] MI: Add value field to output of -var-create
  2007-01-20 21:53       ` Nick Roberts
@ 2007-02-03  4:54         ` Nick Roberts
  2007-02-04 14:10           ` Daniel Jacobowitz
  0 siblings, 1 reply; 21+ messages in thread
From: Nick Roberts @ 2007-02-03  4:54 UTC (permalink / raw)
  To: Daniel Jacobowitz, gdb-patches

On Sat, 20 Jan 2007 14:09:03 Daniel Jacobowitz writes:
 >  > 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).

OK to commit (all changes) ?

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


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

* Re: [PATCH] MI: Add value field to output of -var-create
  2007-02-03  4:54         ` Nick Roberts
@ 2007-02-04 14:10           ` Daniel Jacobowitz
  2007-02-04 21:42             ` Nick Roberts
  0 siblings, 1 reply; 21+ messages in thread
From: Daniel Jacobowitz @ 2007-02-04 14:10 UTC (permalink / raw)
  To: Nick Roberts; +Cc: gdb-patches

On Sat, Feb 03, 2007 at 05:52:34PM +1300, Nick Roberts wrote:
> On Sat, 20 Jan 2007 14:09:03 Daniel Jacobowitz writes:
>  >  > 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).
> 
> OK to commit (all changes) ?

Could you please post a full patch, including changelog?  I'm finding
that when you update just bits of a patch in each message, it is
virtually impossible for me to find all of the current pieces.  I think
this patch will be fine, though.

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: [PATCH] MI: Add value field to output of -var-create
  2007-02-04 14:10           ` Daniel Jacobowitz
@ 2007-02-04 21:42             ` Nick Roberts
  2007-02-08 17:58               ` Daniel Jacobowitz
  0 siblings, 1 reply; 21+ messages in thread
From: Nick Roberts @ 2007-02-04 21:42 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

[-- Attachment #1: message body and .signature --]
[-- Type: text/plain, Size: 1636 bytes --]

 > Could you please post a full patch, including changelog?  I'm finding
 > that when you update just bits of a patch in each message, it is
 > virtually impossible for me to find all of the current pieces.  I think
 > this patch will be fine, though.

Sure.  The code change is just one line (below).  The testsuite changes are
in the attachment.


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


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

	* mi/mi-cmd-var.c (mi_cmd_var_create): Add value field.


2007-02-05  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,
        * gdb.mi/gdb792.exp, gdb.mi/gdb792.exp,
	* lib/mi-support.exp:
	Update tests to include value field in output of -var-create.


*** mi-cmd-var.c	10 Jan 2007 11:56:57 +1300	1.28
--- mi-cmd-var.c	18 Jan 2007 17:26:48 +1300	
*************** mi_cmd_var_create (char *command, char *
*** 125,131 ****
    if (var == NULL)
      error (_("mi_cmd_var_create: unable to create variable object"));
  
!   print_varobj (var, PRINT_NO_VALUES, 0 /* don't print expression */);
  
    do_cleanups (old_cleanups);
    return MI_CMD_DONE;
--- 125,131 ----
    if (var == NULL)
      error (_("mi_cmd_var_create: unable to create variable object"));
  
!   print_varobj (var, PRINT_ALL_VALUES, 0 /* don't print expression */);
  
    do_cleanups (old_cleanups);
    return MI_CMD_DONE;


[-- Attachment #2: Update tests to include value field in output of -var-create. --]
[-- Type: application/octet-stream, Size: 4987 bytes --]

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

* Re: [PATCH] MI: Add value field to output of -var-create
  2007-02-04 21:42             ` Nick Roberts
@ 2007-02-08 17:58               ` Daniel Jacobowitz
  2007-02-08 20:07                 ` Nick Roberts
  0 siblings, 1 reply; 21+ messages in thread
From: Daniel Jacobowitz @ 2007-02-08 17:58 UTC (permalink / raw)
  To: Nick Roberts; +Cc: gdb-patches

On Mon, Feb 05, 2007 at 10:41:52AM +1300, Nick Roberts wrote:
Content-Description: message body and .signature
>  > Could you please post a full patch, including changelog?  I'm finding
>  > that when you update just bits of a patch in each message, it is
>  > virtually impossible for me to find all of the current pieces.  I think
>  > this patch will be fine, though.
> 
> Sure.  The code change is just one line (below).  The testsuite changes are
> in the attachment.

Thanks.  This is OK.

> 2007-02-05  Nick Roberts  <nickrob@snap.net.nz>
> 
> 	* mi/mi-cmd-var.c (mi_cmd_var_create): Add value field.
> 
> 
> 2007-02-05  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,
>         * gdb.mi/gdb792.exp, gdb.mi/gdb792.exp,
> 	* lib/mi-support.exp:
> 	Update tests to include value field in output of -var-create.

Please only put the * on the first line - a comma shouldn't be
followed by a *.

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: [PATCH] MI: Add value field to output of -var-create
  2007-02-08 17:58               ` Daniel Jacobowitz
@ 2007-02-08 20:07                 ` Nick Roberts
  2007-02-08 20:25                   ` Daniel Jacobowitz
  0 siblings, 1 reply; 21+ messages in thread
From: Nick Roberts @ 2007-02-08 20:07 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

> Thanks.  This is OK.

Comitted.

 > > 2007-02-05  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,
 > >         * gdb.mi/gdb792.exp, gdb.mi/gdb792.exp,
 > > 	* lib/mi-support.exp:
 > > 	Update tests to include value field in output of -var-create.
 > 
 > Please only put the * on the first line - a comma shouldn't be
 > followed by a *.

It doesn't display properly in Emacs without a * on each line e.g look at
this change in Emacs:

2007-02-07  Daniel Jacobowitz  <dan@codesourcery.com>

	* gdb.xml/bad-include.xml, gdb.xml/inc-2.xml, gdb.xml/inc-body.xml,
	gdb.xml/includes.xml, gdb.xml/tdesc-xinclude.exp: New files.

The files on the second line are displayed as normal text.

I kept the *'s but removed the commas.  This style is used by the Emacs
project, at least.  The convention used there is that if different files
have different changes then a blank line is left between the ChangeLog entries,
but if the changes are the same then the entries are contiguous.


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


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

* Re: [PATCH] MI: Add value field to output of -var-create
  2007-02-08 20:07                 ` Nick Roberts
@ 2007-02-08 20:25                   ` Daniel Jacobowitz
  2007-02-08 20:27                     ` Daniel Jacobowitz
  2007-02-08 20:44                     ` Nick Roberts
  0 siblings, 2 replies; 21+ messages in thread
From: Daniel Jacobowitz @ 2007-02-08 20:25 UTC (permalink / raw)
  To: Nick Roberts; +Cc: gdb-patches

On Fri, Feb 09, 2007 at 09:07:11AM +1300, Nick Roberts wrote:
> It doesn't display properly in Emacs without a * on each line e.g look at
> this change in Emacs:

Yours doesn't look right in emacs either; spaces instead of tabs
disables the highlighting, and the old date.  I fixed it.

> I kept the *'s but removed the commas.  This style is used by the Emacs
> project, at least.  The convention used there is that if different files
> have different changes then a blank line is left between the ChangeLog entries,
> but if the changes are the same then the entries are contiguous.

I really don't care enough about changelog formatting to argue about
it.  But I will observe one thing: this is GDB, not Emacs, and it's
always more polite to match the style of the file you are changing.
Emacs seems split about 50-50.

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: [PATCH] MI: Add value field to output of -var-create
  2007-02-08 20:25                   ` Daniel Jacobowitz
@ 2007-02-08 20:27                     ` Daniel Jacobowitz
  2007-02-08 20:37                       ` Nick Roberts
  2007-02-08 20:44                     ` Nick Roberts
  1 sibling, 1 reply; 21+ messages in thread
From: Daniel Jacobowitz @ 2007-02-08 20:27 UTC (permalink / raw)
  To: gdb-patches; +Cc: Nick Roberts

My last testsuite run wasn't pretty - could you commit
the change to lib/mi-support.exp please?

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: [PATCH] MI: Add value field to output of -var-create
  2007-02-08 20:37                       ` Nick Roberts
@ 2007-02-08 20:37                         ` Daniel Jacobowitz
  0 siblings, 0 replies; 21+ messages in thread
From: Daniel Jacobowitz @ 2007-02-08 20:37 UTC (permalink / raw)
  To: Nick Roberts; +Cc: gdb-patches

On Fri, Feb 09, 2007 at 09:36:45AM +1300, Nick Roberts wrote:
> Daniel Jacobowitz writes:
>  > My last testsuite run wasn't pretty - could you commit
>  > the change to lib/mi-support.exp please?
> 
> Oops!  Sorry - done now.

Thanks!  Looks much better now.

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: [PATCH] MI: Add value field to output of -var-create
  2007-02-08 20:27                     ` Daniel Jacobowitz
@ 2007-02-08 20:37                       ` Nick Roberts
  2007-02-08 20:37                         ` Daniel Jacobowitz
  0 siblings, 1 reply; 21+ messages in thread
From: Nick Roberts @ 2007-02-08 20:37 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

Daniel Jacobowitz writes:
 > My last testsuite run wasn't pretty - could you commit
 > the change to lib/mi-support.exp please?

Oops!  Sorry - done now.

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


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

* Re: [PATCH] MI: Add value field to output of -var-create
  2007-02-08 20:25                   ` Daniel Jacobowitz
  2007-02-08 20:27                     ` Daniel Jacobowitz
@ 2007-02-08 20:44                     ` Nick Roberts
  1 sibling, 0 replies; 21+ messages in thread
From: Nick Roberts @ 2007-02-08 20:44 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

 > > It doesn't display properly in Emacs without a * on each line e.g look at
 > > this change in Emacs:
 > 
 > Yours doesn't look right in emacs either; spaces instead of tabs
 > disables the highlighting, and the old date.  I fixed it.

Thanks, I also had two entries for gdb792.exp.

 > > I kept the *'s but removed the commas.  This style is used by the Emacs
 > > project, at least.  The convention used there is that if different files
 > > have different changes then a blank line is left between the ChangeLog entries,
 > > but if the changes are the same then the entries are contiguous.
 > 
 > I really don't care enough about changelog formatting to argue about
 > it.  But I will observe one thing: this is GDB, not Emacs, and it's
 > always more polite to match the style of the file you are changing.
 > Emacs seems split about 50-50.

The file is already inconsistent (some entries use "Ditto." or "Likewise.").
I don't see why the font-locking doesn't work in Emacs as it should match
up to the colon.  I'll see if I can get this to work and then I'll match
my entry to yours.

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


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

end of thread, other threads:[~2007-02-08 20:44 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-02 10:07 [PATCH] MI: Add value field to output of -var-create Nick Roberts
2007-01-04 20:20 ` Vladimir Prus
2007-01-04 23:22   ` Nick Roberts
2007-01-04 23:24     ` Daniel Jacobowitz
2007-01-05  7:40     ` Vladimir Prus
2007-01-05 15:07 ` Daniel Jacobowitz
2007-01-05 21:30   ` Nick Roberts
2007-01-07 23:32     ` Daniel Jacobowitz
2007-01-18  9:09   ` Nick Roberts
2007-01-20 19:09     ` Daniel Jacobowitz
2007-01-20 21:53       ` Nick Roberts
2007-02-03  4:54         ` Nick Roberts
2007-02-04 14:10           ` Daniel Jacobowitz
2007-02-04 21:42             ` Nick Roberts
2007-02-08 17:58               ` Daniel Jacobowitz
2007-02-08 20:07                 ` Nick Roberts
2007-02-08 20:25                   ` Daniel Jacobowitz
2007-02-08 20:27                     ` Daniel Jacobowitz
2007-02-08 20:37                       ` Nick Roberts
2007-02-08 20:37                         ` Daniel Jacobowitz
2007-02-08 20:44                     ` Nick Roberts

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