all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* GUD tooltip display
@ 2005-12-28 20:51 Eli Zaretskii
  2005-12-29  2:04 ` Nick Roberts
  0 siblings, 1 reply; 2+ messages in thread
From: Eli Zaretskii @ 2005-12-28 20:51 UTC (permalink / raw)


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.

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?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* GUD tooltip display
  2005-12-28 20:51 GUD tooltip display Eli Zaretskii
@ 2005-12-29  2:04 ` Nick Roberts
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Roberts @ 2005-12-29  2:04 UTC (permalink / raw)
  Cc: emacs-devel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-12-29  2:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-28 20:51 GUD tooltip display Eli Zaretskii
2005-12-29  2:04 ` Nick Roberts

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.