From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22089 invoked by alias); 27 Oct 2003 19:02:36 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 22082 invoked from network); 27 Oct 2003 19:02:36 -0000 Received: from unknown (HELO mail-out3.apple.com) (17.254.13.22) by sources.redhat.com with SMTP; 27 Oct 2003 19:02:36 -0000 Received: from mailgate1.apple.com (a17-128-100-225.apple.com [17.128.100.225]) by mail-out3.apple.com (8.12.10/8.12.9) with ESMTP id h9RJ2ZrY019156 for ; Mon, 27 Oct 2003 11:02:35 -0800 (PST) Received: from scv3.apple.com (scv3.apple.com) by mailgate1.apple.com (Content Technologies SMTPRS 4.2.1) with ESMTP id for ; Mon, 27 Oct 2003 11:02:03 -0800 Received: from [17.201.22.245] (inghji6.apple.com [17.201.22.245]) by scv3.apple.com (8.12.9/8.12.9) with ESMTP id h9RJ270m015872 for ; Mon, 27 Oct 2003 11:02:07 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v606) In-Reply-To: <1067099552.15608.ezmlm@sources.redhat.com> References: <1067099552.15608.ezmlm@sources.redhat.com> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <3E1F6428-08B0-11D8-A22C-000A958F4C44@apple.com> Content-Transfer-Encoding: 7bit From: Jim Ingham Subject: PATCH (gdb/mi) Date: Mon, 27 Oct 2003 19:02:00 -0000 To: gdb-patches@sources.redhat.com X-SW-Source: 2003-10/txt/msg00791.txt.bz2 Nick, Yes, this is what our local version does for the -var-list-children command ('cept we call the variable print_value not values...), and it seems to work well. Eli will probably tell you that you need to update the MI doc's. Jim On Oct 25, 2003, at 9:32 AM, gdb-patches-digest-help@sources.redhat.com wrote: > Purpose: > > With variable objects, the value of array elements and structure > members must > be accessed individually (using the MI command > -var-evaluate-expression). This > means that a front end can take too long processing a separate MI > command for > each element/member. This patch adapts the MI command > -var-list-children so > that all the values can be accessed at once allowing the display of an > array > or structure to be expanded rapidly (in the style of Insight or Visual > Studio). The existing behaviour of -var-list-children is preserved of > backward > compatibility. > > Nick > > > 2003-10-25 Nick Roberts > > * mi-cmd-var.c (mi_cmd_var_list_children): Print the values of the > children, if required. > > > *** mi-cmd-var.c.~1.16.~ 2003-02-02 06:24:04.000000000 +0000 > --- mi-cmd-var.c 2003-10-25 17:03:39.000000000 +0100 > *************** > *** 255,265 **** > struct varobj **childlist; > struct varobj **cc; > struct cleanup *cleanup_children; > ! int numchild; > char *type; > > ! if (argc != 1) > ! error ("mi_cmd_var_list_children: Usage: NAME."); > > /* Get varobj handle, if a valid var obj name was specified */ > var = varobj_get_handle (argv[0]); > --- 255,265 ---- > struct varobj **childlist; > struct varobj **cc; > struct cleanup *cleanup_children; > ! int numchild, values; > char *type; > > ! if (argc != 1 && argc != 2) > ! error ("mi_cmd_var_list_children: Usage: NAME [PRINT_VALUES]"); > > /* Get varobj handle, if a valid var obj name was specified */ > var = varobj_get_handle (argv[0]); > *************** > *** 268,273 **** > --- 268,275 ---- > > numchild = varobj_list_children (var, &childlist); > ui_out_field_int (uiout, "numchild", numchild); > + if (argc == 2) values = atoi (argv[1]); > + else values = 0; > > if (numchild <= 0) > return MI_CMD_DONE; > *************** > *** 284,289 **** > --- 286,293 ---- > ui_out_field_string (uiout, "name", varobj_get_objname (*cc)); > ui_out_field_string (uiout, "exp", varobj_get_expression > (*cc)); > ui_out_field_int (uiout, "numchild", varobj_get_num_children > (*cc)); > + if (values) > + ui_out_field_string (uiout, "value", varobj_get_value (*cc)); > type = varobj_get_type (*cc); > /* C++ pseudo-variables (public, private, protected) do not > have a type */ > if (type) > > > -- Jim Ingham jingham@apple.com Developer Tools Apple Computer