From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18766 invoked by alias); 2 May 2006 06:19:56 -0000 Received: (qmail 18757 invoked by uid 22791); 2 May 2006 06:19:56 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 02 May 2006 06:19:54 +0000 Received: from farnswood.snap.net.nz (p202-124-115-235.snap.net.nz [202.124.115.235]) by viper.snap.net.nz (Postfix) with ESMTP id BDE4E755B64 for ; Tue, 2 May 2006 18:19:51 +1200 (NZST) Received: by farnswood.snap.net.nz (Postfix, from userid 500) id D8BF5627ED; Tue, 2 May 2006 07:20:04 +0100 (BST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17494.64020.26176.277202@farnswood.snap.net.nz> Date: Tue, 02 May 2006 06:19:00 -0000 To: gdb-patches@sources.redhat.com Subject: [PATCH]: MI -var-set-format X-Mailer: VM 7.19 under Emacs 22.0.50.42 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00008.txt.bz2 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 * 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; }