* varobj.c (c_value_of_child): Use the wrapper function,
authorKeith Seitz <keiths@redhat.com>
Mon, 19 Nov 2001 19:44:04 +0000 (19:44 +0000)
committerKeith Seitz <keiths@redhat.com>
Mon, 19 Nov 2001 19:44:04 +0000 (19:44 +0000)
gdb_value_struct_elt.
(cplus_value_of_child): Likewise.

gdb/ChangeLog
gdb/varobj.c

index 727536304cbed092bf9ebc2bc97254609c47b619..a41263a1bfa360dfd49b06954c0e3fbca8197f1c 100644 (file)
@@ -1,3 +1,9 @@
+2001-11-19  Keith Seitz  <keiths@redhat.com>
+
+       * varobj.c (c_value_of_child): Use the wrapper function,
+       gdb_value_struct_elt.
+       (cplus_value_of_child): Likewise.
+
 2001-11-18  Andrew Cagney  <ac131313@redhat.com>
 
        * i386-tdep.c (i386_gdbarch_init): Initialize num_regs.
index e3c193e1ae6e50c846d5940c263700ad7ef1dde8..88af3e901c04cd29b3e35c745e9cb3700b5fea7d 100644 (file)
@@ -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))
        {
This page took 0.029959 seconds and 4 git commands to generate.