This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH, testsuite] Fix regression for gdb.mi/mi-var-create-rtti.exp
- From: Luis Gustavo <luis_gustavo at mentor dot com>
- To: "'gdb-patches at sourceware dot org'" <gdb-patches at sourceware dot org>
- Date: Thu, 18 Apr 2013 12:08:23 +0200
- Subject: [PATCH, testsuite] Fix regression for gdb.mi/mi-var-create-rtti.exp
- Reply-to: "Gustavo, Luis" <luis_gustavo at mentor dot com>
This patch was approved a while ago, but i'm only checking it in now.
Here's what i committed.
Luis
Index: gdb-head/gdb/testsuite/gdb.mi/mi-var-create-rtti.exp
===================================================================
--- gdb-head.orig/gdb/testsuite/gdb.mi/mi-var-create-rtti.exp 2013-04-17 10:24:53.083499115 +0200
+++ gdb-head/gdb/testsuite/gdb.mi/mi-var-create-rtti.exp 2013-04-18 10:46:23.465940961 +0200
@@ -45,8 +45,10 @@ if ![mi_run_to_main] {
# Enable "print object"
mi_gdb_test "-gdb-set print object on" ".*"
-# Test creating a variable for $sp
-mi_gdb_test "-var-create sp1 * \$sp" \
+# Test creating a variable for $sp.
+# We use a explicit cast to (void *) as that is the
+# type that caused the bug this testcase is testing for.
+mi_gdb_test "-var-create sp1 * ((void*)\$sp)" \
"\\^done,name=\"sp1\",numchild=\"0\",value=\"$hex\",type=\"void \\*\",has_more=\"0\"" \
"-var-create sp1 * \$sp"
gdb_exit
Index: gdb-head/gdb/ChangeLog
===================================================================
--- gdb-head.orig/gdb/ChangeLog 2013-04-18 10:39:43.913948060 +0200
+++ gdb-head/gdb/ChangeLog 2013-04-18 10:46:50.085940489 +0200
@@ -1,5 +1,10 @@
2013-04-18 Luis Machado <lgustavo@codesourcery.com>
+ * gdb.mi/mi-var-create-rtti.exp: Create a variable of
+ type void *.
+
+2013-04-18 Luis Machado <lgustavo@codesourcery.com>
+
* ppc-linux-nat.c (ppc_linux_new_thread): Clear the new thread's
debug state prior to replicating existing hardware watchpoints or
breakpoints.