diff options
author | Marc Khouzam <marc.khouzam@ericsson.com> | 2011-08-26 12:32:59 +0000 |
---|---|---|
committer | Marc Khouzam <marc.khouzam@ericsson.com> | 2011-08-26 12:32:59 +0000 |
commit | 0d932b2f8eccc885b1bd4644c12c176b7c128046 (patch) | |
tree | bac7fa1dc643c974ad3e28ea3a2ae0239f4e553b /gdb/varobj.c | |
parent | e93ca0199f5ea2bec534cf051c2007641f952f82 (diff) | |
download | gdb-0d932b2f8eccc885b1bd4644c12c176b7c128046.zip gdb-0d932b2f8eccc885b1bd4644c12c176b7c128046.tar.gz gdb-0d932b2f8eccc885b1bd4644c12c176b7c128046.tar.bz2 |
2011-08-26 Marc Khouzam <marc.khouzam@ericsson.com>
PR mi/11912
* varobj.c (cplus_describe_child): Add the keyword
'class' to the output of the method when dealing
with a cast to a base class.
2011-08-26 Marc Khouzam <marc.khouzam@ericsson.com>
PR mi/11912
* gdb.mi/mi-inheritance-syntax-error.cc: New file.
* gdb.mi/mi-inheritance-syntax-error.exp: New file.
* gdb.mi/mi-var-cp.cc: Updated for new 'class'
keyword in output of -var-info-path-expression.
Diffstat (limited to 'gdb/varobj.c')
-rw-r--r-- | gdb/varobj.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c index eadd62b..7c68a93 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -3443,8 +3443,14 @@ cplus_describe_child (struct varobj *parent, int index, will create an lvalue, for all appearences, so we don't need to use more fancy: *(Base1*)(&d) - construct. */ - *cfull_expression = xstrprintf ("(%s(%s%s) %s)", + construct. + + When we are in the scope of the base class or of one + of its children, the type field name will be interpreted + as a constructor, if it exists. Therefore, we must + indicate that the name is a class name by using the + 'class' keyword. See PR mi/11912 */ + *cfull_expression = xstrprintf ("(%s(class %s%s) %s)", ptr, TYPE_FIELD_NAME (type, index), ptr, |