From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5048 invoked by alias); 30 Jul 2007 21:33:50 -0000 Received: (qmail 5038 invoked by uid 22791); 30 Jul 2007 21:33:48 -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; Mon, 30 Jul 2007 21:33:42 +0000 Received: from kahikatea.snap.net.nz (192.63.255.123.dynamic.snap.net.nz [123.255.63.192]) by viper.snap.net.nz (Postfix) with ESMTP id DDFC83DA03E; Tue, 31 Jul 2007 09:33:38 +1200 (NZST) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id 5583B8FC6D; Tue, 31 Jul 2007 09:33:37 +1200 (NZST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18094.22832.139526.843547@kahikatea.snap.net.nz> Date: Mon, 30 Jul 2007 23:17:00 -0000 To: =?utf-8?q?Andr=C3=A9_P=C3=B6nitz?= Cc: gdb-patches@sourceware.org Subject: Re: Type information in -data-evaluate-expression In-Reply-To: <200707301733.59718.apoenitz@trolltech.com> References: <200707301540.59361.apoenitz@trolltech.com> <200707301733.59718.apoenitz@trolltech.com> X-Mailer: VM 7.19 under Emacs 22.1.50.3 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: 2007-07/txt/msg00315.txt.bz2 > > What is the use case where you need to just get the type of an expression, > > without doing anything with it? > > One use case would be to display values in a graphical frontend > when hovering (or even moving) the mouse over some expression. > My current "best practice" here is to create a variable called "tooltip", > extract value and type and delete it again, only to create it again > with a slightly different expression etc. So I need two roundtrips > and need some syncronization to handle the two partial results > whereas the proposed "enhanced" version would allow a simple > hit-and-run implementation... What happens if you have compiled with "-g3", have the line #define STOP abort () in your code and the mouse hovers over STOP? Also do the values of large arrays/structures appear as large tooltips? Around the end of last year there was a discussion on gdb-patches (Re: variable objects and registers) about using variable objects for tooltips. Jim Ingham said that Apple currently do this for Xcode and it works well. I think we should explore this possibility and perhaps review their code. -- Nick http://www.inet.net.nz/~nickrob