This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


 > > 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: testsuite.diff
Description: Update tests for -var-create to include value field.


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