From: Keith Seitz Date: Wed, 10 Oct 2001 17:01:52 +0000 (+0000) Subject: * varobj.c (cplus_value_of_child): Deal with a failure X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4abb499edbac34276f74c5244da30faefcc81843;p=binutils-gdb.git * varobj.c (cplus_value_of_child): Deal with a failure to dereference a pointer object. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index aec3c62ca9e..393c6c107f0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2001-10-10 Keith Seitz + + * varobj.c (cplus_value_of_child): Deal with a failure + to dereference a pointer object. + 2001-10-08 J. Brobecker * hpux-thread.c: rewrite find_active_thread() and find_tcb() 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;