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 Tuesday 02 May 2006 21:22, Jim Ingham wrote:
> Shouldn't the call to var->root->lang->value_of_root down at the
> bottom of value_of_root take care of fetching the new value?  

Well, it fetches the new value, I believe.

> You 
> don't want to discard the old varobj unless you have to, because if
> the varobj represents a structure or pointer to a structure and the
> user has fetched any children, or changed the format, or whatever,
> you will lose that state.

Ah, that's right. In fact much of complexity in current KDevelop code is 
maintaining open/close state of items, so would be nice if gdb handled this.
Do you suggest that we don't create new varobj unless value change, or that we 
carry over all settings from the old one to the new?

>
> Also, I must be missing something this morning, but I can't see any
> difference between your two examples.

Ah, sorry, they are the same indeed. In the second example, the type of 'i' 
inside 'foo' function should be 'int'. In that case, gdb does not notice that 
name 'i' now refers to different variable.

- Volodya


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