From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28916 invoked by alias); 31 Oct 2007 11:59:21 -0000 Received: (qmail 28908 invoked by uid 22791); 31 Oct 2007 11:59:21 -0000 X-Spam-Check-By: sourceware.org Received: from zigzag.lvk.cs.msu.su (HELO zigzag.lvk.cs.msu.su) (158.250.17.23) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 31 Oct 2007 11:59:17 +0000 Received: from Debian-exim by zigzag.lvk.cs.msu.su with spam-scanned (Exim 4.50) id 1InDA2-0008Tr-5o for gdb-patches@sources.redhat.com; Wed, 31 Oct 2007 15:59:11 +0300 Received: from localhost ([127.0.0.1] helo=ip6-localhost) by zigzag.lvk.cs.msu.su with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.50) id 1InD9s-0008TO-6u; Wed, 31 Oct 2007 15:58:56 +0300 From: Vladimir Prus To: Nick Roberts Subject: Re: [PATCH] MI: lvalues and variable_editable Date: Wed, 31 Oct 2007 14:16:00 -0000 User-Agent: KMail/1.9.6 Cc: gdb-patches@sources.redhat.com References: <18210.27153.559569.601092@kahikatea.snap.net.nz> <200710301222.03459.ghost@cs.msu.su> <18215.4053.151140.671560@kahikatea.snap.net.nz> In-Reply-To: <18215.4053.151140.671560@kahikatea.snap.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200710311458.58112.ghost@cs.msu.su> 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: 2007-10/txt/msg00861.txt.bz2 On Tuesday 30 October 2007 14:04:53 Nick Roberts wrote: > > I believe that var->value will be NULL. > > Yes, that looks good. I'll use: > > if (!var->value || !VALUE_LVAL(var->value)) > return 0; > > and that should keep us both happy. As long there which code *replaces* gdb_evaluate_expression, I'm perfectly happy. Thanks! > > GDB, > > as it stands, allows you to create a variable object in any frame, and your > > patch does not work with that. So, either creating variable objects in any > > frame should be disallowed, > > Actually I think that would be a good idea. Generally a user would create a > watch expression in the frame he's examining. If not, the frontend would have > to prompt for the frame. Does KDevelop do this? At the moment, KDevelop does not have any command that would create varobj in non-current frame (although it's possible to create varobj in one frame, and then assign to it while the current frame is different). Daniel Jacobowitz later wrote: > > Actually I think that would be a good idea. Generally a user would > > create a watch expression in the frame he's examining. If not, the > > frontend would have to prompt for the frame. Does KDevelop do this? > > If you have a GUI with a stack pane, it may be showing a lot of frames > at once. Why force the front end to select a frmae before creating > the varobj? Yeah. For example, if stack widgets shows variables it would be quite reasonable to allow expanding a variable, and creating varobj for some nested field, and there's no need to switch frames. (The problem with switching frames is that GUI and gdb will be temporary out-of-sync, and generally all cases where GUI and gdb are out of sync lead to bugs). - Volodya