This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] MI: Free values when updating
- From: Nick Roberts <nickrob at snap dot net dot nz>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 23 Jan 2007 20:45:13 +1300
- Subject: [PATCH] MI: Free values when updating
The recent changes to varobj.c have resulted in values computed with
-var-update not being freed automatically. This makes computation longer and
progressively so as currently free_all_values doesn't always get called.
--
Nick http://www.inet.net.nz/~nickrob
2007-01-23 Nick Roberts <nickrob@snap.net.nz>
* varobj.c (install_new_value): Don't call release_value when
updating.
*** varobj.c 16 Jan 2007 18:34:59 +1300 1.79
--- varobj.c 23 Jan 2007 18:26:57 +1300
*************** install_new_value (struct varobj *var, s
*** 917,923 ****
/* We are not interested in the address of references, and given
that in C++ a reference is not rebindable, it cannot
meaningfully change. So, get hold of the real value. */
! if (value)
{
value = coerce_ref (value);
release_value (value);
--- 917,923 ----
/* We are not interested in the address of references, and given
that in C++ a reference is not rebindable, it cannot
meaningfully change. So, get hold of the real value. */
! if (initial && value)
{
value = coerce_ref (value);
release_value (value);