This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: -var-update and address changes
- From: Vladimir Prus <ghost at cs dot msu dot su>
- To: Jim Ingham <jingham at apple dot com>
- Cc: Daniel Jacobowitz <drow at false dot org>, gdb at sources dot redhat dot com
- Date: Tue, 2 May 2006 16:49:15 +0400
- Subject: Re: -var-update and address changes
- References: <e1iqcl$2k4$1@sea.gmane.org> <20060414131549.GC12955@nevyn.them.org> <DB0425AC-0CCB-448C-BC15-7E6644C6CB0B@apple.com>
On Friday 14 April 2006 23:49, Jim Ingham wrote:
> Note as an aside, that we had to add another varobj type which is
> evaluated in the selected frame, whatever that happens to be. That
> was useful for a general "variable inspector" window. People wanted
> to put some expression there, and have it re-evaluated in the topmost
> frame whenever they stopped. So we added that functionality. But
> that is clearly distinct from what the "*" varobj type is supposed to
> mean.
Hi Jim,
is this "variable inspector" the same thing that's called "watches" in other
IDEs? Well, I really wish that gdb did support variable objects that are
reevaluated in the current frame. As it stands now, I have to re-create
variable objects on each step.
Alternatively, it might be good if gdb provided some way to identify specific
scope. Then, "watches" can be bound to that scope and be automatically
disabled when out of scope.
In other words, suppose that while inside some function I'm interested in
value of "i + 10". Then, there are two choices:
- Somehow record the scope where I'm interested in that expression,
and show expression as disabled elsewhere.
- Try to recompute the expression on each stop.
While the second approach at least guarantees that the expression will be
re-evaluated each time I enter the "interesting" scope, it also involves a
bit of extra work for re-evaluating it in other "uninteresting" scopes.
- Volodya