summaryrefslogtreecommitdiff
path: root/gdb/varobj.c
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2001-10-10 17:01:52 +0000
committerKeith Seitz <keiths@redhat.com>2001-10-10 17:01:52 +0000
commited8d55f41624b1b2f3419c9dbce4d0dfba2fa16e (patch)
tree6d7e2e41b337dd548b5921ef77408878131e69da /gdb/varobj.c
parenteb6f1ba3a48d8bf32feaadccff50f2a816d81ee9 (diff)
downloadgdb-ed8d55f41624b1b2f3419c9dbce4d0dfba2fa16e.tar.gz
* varobj.c (cplus_value_of_child): Deal with a failure
to dereference a pointer object.
Diffstat (limited to 'gdb/varobj.c')
-rw-r--r--gdb/varobj.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c
index c3a159bcbfc..ef2499d4746 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -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;