[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GUD tooltip display

From: Nick Roberts
Subject: GUD tooltip display
Date: Thu, 29 Dec 2005 15:04:22 +1300

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]