From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22365 invoked by alias); 15 Nov 2006 20:29:41 -0000 Received: (qmail 22357 invoked by uid 22791); 15 Nov 2006 20:29:40 -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; Wed, 15 Nov 2006 20:29:27 +0000 Received: from kahikatea.snap.net.nz (p202-124-125-17.snap.net.nz [202.124.125.17]) by viper.snap.net.nz (Postfix) with ESMTP id 550353D82DB; Thu, 16 Nov 2006 09:29:45 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id 71CB6BE43E; Thu, 16 Nov 2006 09:25:24 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17755.30642.667665.206754@kahikatea.snap.net.nz> Date: Wed, 15 Nov 2006 20:29:00 -0000 To: Vladimir Prus Cc: Daniel Jacobowitz , gdb-patches@sources.redhat.com Subject: Re: MI: -var-list-children --simple-values In-Reply-To: <200611151929.29567.vladimir@codesourcery.com> References: <200611151250.11654.vladimir@codesourcery.com> <200611151755.02301.vladimir@codesourcery.com> <20061115150940.GA26174@nevyn.them.org> <200611151929.29567.vladimir@codesourcery.com> X-Mailer: VM 7.19 under Emacs 22.0.90.14 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-11/txt/msg00133.txt.bz2 > > I didn't invent --simple-values though, I just added it to -var-update. > > Nick added it to -stack-list-locals on 20-Jan-2004. Ah here: > > http://sourceware.org/ml/gdb/2003-11/msg00055.html Actually I think you added it to -var-update (where I think it makes no difference as all values here are simple) and -var-list-children. I think this all started because when I suggested "--all-values" for -var-update and -var-list-children Eli found the names unfortunate and suggested others. I think the final solution was an effort to keep everyone happy. > This is in fact completely different change. Here's > what "-stack-list-locals --all-values" produces: > > ^done,locals=[{name="the_struct",value="{a_fr = 120, b = 333, inner_fr = > {i = 0, j = 5, k = 5}, c = 3, pad = {0 }, d = > 10, pad2 = {0 }, e = 10}"}] > > So, the difference between --all-values and --simple-values is dramatic. In > case of --var-list-children you don't get full structure printed. You won't > even have the structure *read* (with my laziness patch, that is). Yes, I describe the purpose in the manual: ...; and if it is 2 or `--simple-values', print the name, type and value for simple data types and the name and type for arrays, structures and unions. In this last case, a frontend can immediately display the value of simple data types and create variable objects for other data types when the the user wishes to explore their values in more detail. ISTR this is what Totalview does (not that it matters but it might help some understand its purpose). > So, while --simple-values might be reasonable for -stack-list-locals, it's > not all that needed for -var-list-children. I can't see where it's needed, but its more trouble to remove than to fix. -- Nick http://www.inet.net.nz/~nickrob