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: Nick Roberts <nickrob at snap dot net dot nz>, Daniel Jacobowitz <drow at false dot org>, gdb at sources dot redhat dot com
- Date: Wed, 3 May 2006 10:02:21 +0400
- Subject: Re: -var-update and address changes
- References: <e1iqcl$2k4$1@sea.gmane.org> <200605021740.40193.ghost@cs.msu.su> <1B177ECC-2AD9-4476-AF44-D91F4268E70E@apple.com>
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