This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Type information in -data-evaluate-expression
> > 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