all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nick Roberts <nickrob@snap.net.nz>
Cc: emacs-devel@gnu.org
Subject: GUD tooltip display
Date: Thu, 29 Dec 2005 15:04:22 +1300	[thread overview]
Message-ID: <17331.17446.791810.259281@kahikatea.snap.net.nz> (raw)
In-Reply-To: <u64p9t076.fsf@gnu.org>

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

      reply	other threads:[~2005-12-29  2:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-28 20:51 GUD tooltip display Eli Zaretskii
2005-12-29  2:04 ` Nick Roberts [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17331.17446.791810.259281@kahikatea.snap.net.nz \
    --to=nickrob@snap.net.nz \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.