* varobj.c (cplus_value_of_child): Deal with a failure
authorKeith Seitz <keiths@redhat.com>
Wed, 10 Oct 2001 17:01:52 +0000 (17:01 +0000)
committerKeith Seitz <keiths@redhat.com>
Wed, 10 Oct 2001 17:01:52 +0000 (17:01 +0000)
to dereference a pointer object.

gdb/ChangeLog
gdb/varobj.c

index aec3c62ca9e0e7edd248e03fb0aead8ae1a99a13..393c6c107f0814b104c71a9ab6f8156593a52061 100644 (file)
@@ -1,3 +1,8 @@
+2001-10-10  Keith Seitz  <keiths@redhat.com>
+
+       * varobj.c (cplus_value_of_child): Deal with a failure
+       to dereference a pointer object.
+
 2001-10-08  J. Brobecker <brobecker@gnat.com>
 
        * hpux-thread.c: rewrite find_active_thread() and find_tcb()
index c3a159bcbfc9eb1d761b0fdb5a443aae41be68b7..ef2499d47466262ac1f8418a8ac67da2ec2ab074 100644 (file)
@@ -2313,7 +2313,10 @@ cplus_value_of_child (struct varobj *parent, int index)
 
              if (TYPE_CODE (VALUE_TYPE (parent->value)) == TYPE_CODE_PTR
                  || TYPE_CODE (VALUE_TYPE (parent->value)) == TYPE_CODE_REF)
-               gdb_value_ind (parent->value, &temp);
+               {
+                 if (!gdb_value_ind (parent->value, &temp))
+                   return NULL;
+               }
              else
                temp = parent->value;