From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: GUD tooltip display Date: Thu, 29 Dec 2005 15:04:22 +1300 Message-ID: <17331.17446.791810.259281@kahikatea.snap.net.nz> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1135821935 3282 80.91.229.2 (29 Dec 2005 02:05:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 29 Dec 2005 02:05:35 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 29 03:05:32 2005 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1ErnAa-0003NI-3i for ged-emacs-devel@m.gmane.org; Thu, 29 Dec 2005 03:05:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ErnBu-00017E-NU for ged-emacs-devel@m.gmane.org; Wed, 28 Dec 2005 21:06:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ErnBe-00015D-In for emacs-devel@gnu.org; Wed, 28 Dec 2005 21:06:38 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ErnBd-00014K-NF for emacs-devel@gnu.org; Wed, 28 Dec 2005 21:06:38 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ErnBd-00014A-IU for emacs-devel@gnu.org; Wed, 28 Dec 2005 21:06:37 -0500 Original-Received: from [202.37.101.8] (helo=viper.snap.net.nz) by monty-python.gnu.org with esmtp (Exim 4.34) id 1ErnBs-00024I-Rb; Wed, 28 Dec 2005 21:06:53 -0500 Original-Received: from kahikatea.snap.net.nz (p39-tnt1.snap.net.nz [202.124.110.39]) by viper.snap.net.nz (Postfix) with ESMTP id CA5CF731741; Thu, 29 Dec 2005 15:05:08 +1300 (NZDT) Original-Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id 9B70E8420; Thu, 29 Dec 2005 15:04:23 +1300 (NZDT) Original-To: Eli Zaretskii In-Reply-To: X-Mailer: VM 7.19 under Emacs 22.0.50.36 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:48469 Archived-At: Eli Zaretskii writes: > Could gdb-ui.el be extended to display class members in a tooltip? > > Currently, when the mouse pointer is above a class name, the tooltip > says something like "(Class foo *) 0x12345678". Could it instead > display the result of "ptype foo" or "ptype *foo? It seems like other > visual debuggers do that. I see that I broke the dereferencing when I made changes to guard against inadvertant function calls through macros. I've installed a fix so that the function gud-tooltip-dereference should now toggle whether the tooltip displays "print foo" or "print *foo". Incidentally, variable objects "do the right thing" automatically. Perhaps there could be a GDB command to do the same for printing values. In Emacs 21.2, [S-Mouse-3] toggled dereferencing on a global binding. I might have removed that feature, but its clearly not desriable. Is it possible, when there is mouse movement, to distinguish whether the control or meta keys are depressed? If so, maybe this could be used to select the behaviour. If you want it to work differently for C++ so that it uses "ptype" you will have to explain to me how this would work alongside the current behaviour, as I don't understand when it would be used. > Also, for simple scalar variables, the tooltip says "$1 = 12345". > Isn't it better to say "foo = 12345" (where `foo' is the variable's > name)? Convenience variables such as $1 are for GDB command-line > junkies, visually oriented (and command-line challenged) users might > become confused by the $1 thingy; OTOH, displaying the variable's name > could help if, e.g., the pointer is on the wrong token, or if the > expression under the pointer is not well defined or obvious. > > WDYT? That sounds sensible. I have installed a fix for this. Nick