This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -var-update and address changes


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]