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.
This commit is contained in:
Marc Khouzam
2011-08-26 12:32:59 +00:00
parent e93ca0199f
commit 0d932b2f8e
6 changed files with 128 additions and 5 deletions

View File

@ -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,