aboutsummaryrefslogtreecommitdiff
path: root/gdb/varobj.c
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2001-11-19 19:44:04 +0000
committerKeith Seitz <keiths@redhat.com>2001-11-19 19:44:04 +0000
commit30c6b1fbe984d8cf5cb51f21aeef1241fd53524e (patch)
tree95f5bba156cb19ef82185eb6a2e27cab5e8c0937 /gdb/varobj.c
parent84c254c6468727c14abf8f639a2605d5a08f4a14 (diff)
downloadfsf-binutils-gdb-30c6b1fbe984d8cf5cb51f21aeef1241fd53524e.zip
fsf-binutils-gdb-30c6b1fbe984d8cf5cb51f21aeef1241fd53524e.tar.gz
fsf-binutils-gdb-30c6b1fbe984d8cf5cb51f21aeef1241fd53524e.tar.bz2
* varobj.c (c_value_of_child): Use the wrapper function,
gdb_value_struct_elt. (cplus_value_of_child): Likewise.
Diffstat (limited to 'gdb/varobj.c')
-rw-r--r--gdb/varobj.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c
index e3c193e..88af3e9 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -1952,7 +1952,7 @@ c_value_of_child (struct varobj *parent, int index)
case TYPE_CODE_STRUCT:
case TYPE_CODE_UNION:
- value = value_struct_elt (&temp, NULL, name, NULL, "vstructure");
+ gdb_value_struct_elt (NULL, &value, &temp, NULL, name, NULL, "vstructure");
break;
case TYPE_CODE_PTR:
@@ -1960,8 +1960,7 @@ c_value_of_child (struct varobj *parent, int index)
{
case TYPE_CODE_STRUCT:
case TYPE_CODE_UNION:
- value =
- value_struct_elt (&temp, NULL, name, NULL, "vstructure");
+ gdb_value_struct_elt (NULL, &value, &temp, NULL, name, NULL, "vstructure");
break;
default:
@@ -2298,9 +2297,11 @@ cplus_value_of_child (struct varobj *parent, int index)
if (CPLUS_FAKE_CHILD (parent))
{
struct value *temp = parent->parent->value;
- value = value_struct_elt (&temp, NULL, name,
- NULL, "cplus_structure");
- release_value (value);
+
+ gdb_value_struct_elt (NULL, &value, &temp, NULL, name, NULL,
+ "cplus_structure");
+ if (value != NULL)
+ release_value (value);
}
else if (index >= TYPE_N_BASECLASSES (type))
{