This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: MI: Another -var-update bug?
- From: Vladimir Prus <ghost at cs dot msu dot su>
- To: Nick Roberts <nickrob at snap dot net dot nz>, gdb at sources dot redhat dot com
- Date: Tue, 12 Dec 2006 20:03:50 +0300
- Subject: Re: MI: Another -var-update bug?
- References: <17790.36044.454650.114329@kahikatea.snap.net.nz>
Nick Roberts wrote:
[moving this to -devel from -patches]
> Variable objects appear to test scope on a frame basis (in c_value_of
> root). If we create a variable object for j in the inner block of the
> program below
> then doing -var-update on line 10 doesn't report it as being out of scope.
> But
> struct varobj_root has a member struct block *valid_block. Presumably the
> addresses in this structure can be used to test if the variable is still
> in scope or not
The 'out of scope' and nested scopes are just completely broken. I've tried
to make use of them some time ago, and could not make them work in any
sensible way.
That's why KDevelop computes addresses of each locals on each step, and if
address changes, manually recreates a variable object. This should be in
gdb, but it's a bit scary change ;-)
- Volodya