This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] testsuite: unreliable gdb.mi/mi-inheritance-syntax-error.exp [Re: [patch] Tweak output of -var-info-path-expression]


On Fri, 26 Aug 2011 14:35:50 +0200, Marc Khouzam wrote:
> Committed as below to HEAD and the 7.3 branch.

-data-evaluate-expression "(*(class A*) this)"
^done,value="{a = -9296}"
(gdb) 
FAIL: gdb.mi/mi-inheritance-syntax-error.exp: -data-evaluate-expression (*(class A*) this)

I guess this part was not the subject of the test but I rather ask, OK to
check-in?


Thanks,
Jan


gdb/testsuite/
2011-08-26  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* gdb.mi/mi-inheritance-syntax-error.cc (A): Make `a' public.
	(C): Initialize `a'.
	* gdb.mi/mi-inheritance-syntax-error.exp
	(-data-evaluate-expression $path):  Expect `a' as 5.

--- a/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.cc
+++ b/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.cc
@@ -5,7 +5,8 @@
 
 class A
 {
-	int a;
+	public:
+		int a;
 };
 
 class C : public A
@@ -13,6 +14,7 @@ class C : public A
 	public:
 		C()
 		{
+			a = 5;
 		};
 		void testLocation()
 		{
--- a/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp
+++ b/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp
@@ -66,7 +66,7 @@ verbose "Using $path for data-evaluate-expression" 2
 
 
 mi_gdb_test "-data-evaluate-expression \"$path\"" \
-    "\\^done,value=\"\{a = \[0-9\]*\}\"" \
+    "\\^done,value=\"\{a = 5\}\"" \
     "-data-evaluate-expression $path"
 
 mi_gdb_exit


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]