aboutsummaryrefslogtreecommitdiff
path: root/gdb/varobj.c
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2007-01-24 19:54:13 +0000
committerVladimir Prus <vladimir@codesourcery.com>2007-01-24 19:54:13 +0000
commit85d93f1df0c6a196327ecde7fdb4e72dbc879ee7 (patch)
tree7cc952e4002e05e1538e7b446b01d6f861756964 /gdb/varobj.c
parented9ef263243b8a6b7fb98658edae023dc68d4373 (diff)
downloadgdb-85d93f1df0c6a196327ecde7fdb4e72dbc879ee7.zip
gdb-85d93f1df0c6a196327ecde7fdb4e72dbc879ee7.tar.gz
gdb-85d93f1df0c6a196327ecde7fdb4e72dbc879ee7.tar.bz2
* varobj.c (c_value_of_root, c_value_of_child)
(cplus_describe_child): Don't call release_value.
Diffstat (limited to 'gdb/varobj.c')
-rw-r--r--gdb/varobj.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c
index ccca051..578a4d1 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -2020,13 +2020,8 @@ c_value_of_root (struct varobj **var_handle)
if (within_scope)
{
/* We need to catch errors here, because if evaluate
- expression fails we just want to make val->error = 1 and
- go on */
- if (gdb_evaluate_expression (var->root->exp, &new_val))
- {
- release_value (new_val);
- }
-
+ expression fails we want to just return NULL. */
+ gdb_evaluate_expression (var->root->exp, &new_val);
return new_val;
}
@@ -2038,8 +2033,6 @@ c_value_of_child (struct varobj *parent, int index)
{
struct value *value = NULL;
c_describe_child (parent, index, NULL, &value, NULL);
- if (value != NULL)
- release_value (value);
return value;
}
@@ -2304,7 +2297,6 @@ cplus_describe_child (struct varobj *parent, int index,
if (cvalue && value)
{
*cvalue = value_cast (TYPE_FIELD_TYPE (type, index), value);
- release_value (*cvalue);
}
if (ctype)