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]

[PATCH]: MI -var-set-format


Currently:

  -var-evaluate-expression var1
  ^done,value="18"

  -var-set-format var1 hexadecimal
  ^done,format="hexadecimal"

-var-set-format just repeats the format that has been set which is not
very useful since presumably the front end sent it in the first place.

I would like to add the value in the (new) current format, which I find
much more useful:

  -var-set-format var1 hexadecimal
  ^done,format="hexadecimal",value="0x12"

OK to apply if I update the testsuite accordingly?


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


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

	* mi/mi-cmd-var.c (mi_cmd_var_set_format): Add value field to output.



*** mi-cmd-var.c	31 Mar 2006 12:46:48 +1200	1.23
--- mi-cmd-var.c	02 May 2006 18:16:39 +1200	
***************
*** 211,216 ****
--- 211,219 ----
  
    /* Report the new current format */
    ui_out_field_string (uiout, "format", varobj_format_string[(int) format]);
+ 
+   /* Report the value in the new format */
+   ui_out_field_string (uiout, "value", varobj_get_value (var));
    return MI_CMD_DONE;
  }


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