From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9417 invoked by alias); 2 Jan 2012 16:48:31 -0000 Received: (qmail 9400 invoked by uid 22791); 2 Jan 2012 16:48:28 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-ww0-f43.google.com (HELO mail-ww0-f43.google.com) (74.125.82.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 02 Jan 2012 16:48:13 +0000 Received: by wgbds11 with SMTP id ds11so21926203wgb.12 for ; Mon, 02 Jan 2012 08:48:12 -0800 (PST) Received: by 10.227.206.4 with SMTP id fs4mr48160588wbb.21.1325522892166; Mon, 02 Jan 2012 08:48:12 -0800 (PST) Received: from [192.168.0.103] (bl16-31-110.dsl.telepac.pt. [188.81.31.110]) by mx.google.com with ESMTPS id k33sm9087951wbo.5.2012.01.02.08.48.10 (version=SSLv3 cipher=OTHER); Mon, 02 Jan 2012 08:48:10 -0800 (PST) Message-ID: <4F01DFC8.9040105@gmail.com> Date: Mon, 02 Jan 2012 16:48:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: Joel Brobecker CC: gdb-patches@sourceware.org, vladimir@codesourcery.com, Tom Tromey Subject: Re: RFC: how to handle mutable types in varobj? References: <20111228155943.GD2632@adacore.com> <20111229111024.GT23376@adacore.com> <4F01D098.6050206@gmail.com> <20120102162146.GC2730@adacore.com> In-Reply-To: <20120102162146.GC2730@adacore.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-01/txt/msg00049.txt.bz2 On 01/02/2012 04:21 PM, Joel Brobecker wrote: > Hi Pedro, > > Thanks for the feedback. Do you mean that the changes you are talking > about are already in the tree? No sorry. I was talking about changes that were never posted. > My interpretation of the current code > was that python pretty-printing was implemented a little ad hoc, > almost as an exception to the normal varobjs... That's why I am > a little confused by the process your went through. That being said, > It's been a few days since I looked at the code, and it took me a long > time to start understanding the code better. I might simply still be > missing many things - I need to study the code again in detail to comment > in detail. > > In the meantime: > >> Implementing Ada mutable types support through this would mean mutable >> varobjs would be exposed as dynamic=1 varobjs. I'm not sure that'd be >> a problem? > > GDB would set the dynamic property, right? That would work for me. Yeah, something like that, but I think it'll need a bit more than just one line setting a flag. > >> With frontends that currently support dynamic varobjs, >> things should simply work. Non dynamic varobjs were kind of a mistake >> anyway (a !dynamic varobj that is bound to an 10000000 element array >> is wholly fetched in gdb memory at once...). > > Agreed! > >> That said, if you don't want to go that way, it's fine with me. Just >> putting it out there.. > > I would like to do what's right once and for all :-). Of course, > if the "right thing" is costing too much effort, then I might look > for compromises. But for now, I am still looking for guidance in > terms of the varobj interface itself, and achieve compliance. > > For instance, I had imagined the case where some children of a varobj > that has mutated might still be around. But unlike you, I thought I'd > keep it as simple as possible to start, so if it was sufficient to > just reset all the children, well that is an easy thing to do :-). It may well be the best in the end. Let me see if we can get them to you, so you can see and decide whether it's a path you want to take. -- Pedro Alves