From 4ae4f4fb150a246ec9232d07cf754f9691feb7c9 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 6 Dec 2006 09:01:50 +0000 Subject: [PATCH] 2006-12-06 Vladimir Prus * varobj.c (cplus_value_of_child): When accessing base suboject, don't specially process references. --- gdb/ChangeLog | 5 +++++ gdb/varobj.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b26756f469c..fc4d21a8c24 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2006-12-06 Vladimir Prus + + * varobj.c (cplus_value_of_child): When accessing + base suboject, don't specially process references. + 2006-12-05 Adam Nemet * MAINTAINERS (Write After Approval): Add myself. diff --git a/gdb/varobj.c b/gdb/varobj.c index 309bd5e6e86..a06aab8f296 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -2428,8 +2428,9 @@ cplus_value_of_child (struct varobj *parent, int index) { struct value *temp = NULL; - if (TYPE_CODE (value_type (parent->value)) == TYPE_CODE_PTR - || TYPE_CODE (value_type (parent->value)) == TYPE_CODE_REF) + /* No special processing for references is needed -- + value_cast below handles references. */ + if (TYPE_CODE (value_type (parent->value)) == TYPE_CODE_PTR) { if (!gdb_value_ind (parent->value, &temp)) return NULL;