aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.cc
diff options
context:
space:
mode:
authorMarc Khouzam <marc.khouzam@ericsson.com>2011-08-26 12:32:59 +0000
committerMarc Khouzam <marc.khouzam@ericsson.com>2011-08-26 12:32:59 +0000
commit0d932b2f8eccc885b1bd4644c12c176b7c128046 (patch)
treebac7fa1dc643c974ad3e28ea3a2ae0239f4e553b /gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.cc
parente93ca0199f5ea2bec534cf051c2007641f952f82 (diff)
downloadbinutils-0d932b2f8eccc885b1bd4644c12c176b7c128046.zip
binutils-0d932b2f8eccc885b1bd4644c12c176b7c128046.tar.gz
binutils-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/testsuite/gdb.mi/mi-inheritance-syntax-error.cc')
-rw-r--r--gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.cc29
1 files changed, 29 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.cc b/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.cc
new file mode 100644
index 0000000..9cc0518
--- /dev/null
+++ b/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.cc
@@ -0,0 +1,29 @@
+// Test for -var-info-path-expression syntax error
+// caused by PR 11912
+#include <string.h>
+#include <stdio.h>
+
+class A
+{
+ int a;
+};
+
+class C : public A
+{
+ public:
+ C()
+ {
+ };
+ void testLocation()
+ {
+ z = 1;
+ };
+ int z;
+};
+
+int main()
+{
+ C c;
+ c.testLocation();
+ return 0;
+}