This is the mail archive of the
mailing list for the GDB project.
Re: MI: type prefixes for values
On Apr 6, 2006, at 9:19 AM, Daniel Jacobowitz wrote:
On Thu, Apr 06, 2006 at 09:06:14AM -0700, Jim Ingham wrote:
-var-evaluate-expression just fetches the data for the expression as
it was last computed. As such, it doesn't know in or out of scope.
I can see, from careful inspection, that this is true. It surprised
the heck out of me. I'd have expected it to evaluate it now, not to
return the last evaluated value.
Should it do this? If so, we should fix the manual.
I think the idea here was that if you wanted you could use varobj's
as "history" if you wanted to. It is also might be convenient that
if you are using one varobj to display a value in a number of places
in the UI you don't have to re-evaluate it every time. But to tell
the truth, I don't think either of these features is used in Xcode or
in Insight either, IIRC.
Eek! Every call to c_value_of_root for a local changes the selected
frame and reinitializes the frame cache, discarding previous
unwindings. That's awful. I sure hope it isn't necessary.
That looks like that's been there for a long time. I am not sure why
it is necessary. It doesn't cause as much problem as you would
expect, since in common practice, you get the stack, and display
that, then just noodle around in the variables on the bottom of the
stack. But you're right, it would be good not to do this. I'll try
taking it out, and see what happens under Xcode.