This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[Patch] mi-var-display regression failures fix
- From: "Marc Khouzam" <marc dot khouzam at ericsson dot com>
- To: <gdb-patches at sourceware dot org>
- Date: Tue, 1 Apr 2008 09:56:25 -0400
- Subject: [Patch] mi-var-display regression failures fix
Hi,
There are a couple of new unexpected failures in MI regressions.
I believe that an xfail marker was removed by mistake, which makes a couple of tests seem to fail.
Instead of putting back the xfail, I thought that fixing the error may be even better :-)
This patch fixes those two testcases by having the test program run until variable are initialized.
BTW, you should have my Copyright Assignment on file now, and my sourceforge account is setup,
so I can commit this if I get approval.
Thanks
--
Marc Khouzam
Changelog:
2008-04-01 Marc Khouzam <marc.khouzam@ericsson.com>
* gdb.mi/mi-var-display.exp: Stop at end of do_special_tests
instead of beginning to make an extra test pass.
* gdb.mi/mi2-var-display.exp: Likewise.
Index: gdb/testsuite/gdb.mi/mi-var-display.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-display.exp,v
retrieving revision 1.23
diff -u -r1.23 mi-var-display.exp
--- gdb/testsuite/gdb.mi/mi-var-display.exp 26 Mar 2008 13:36:51 -0000 1.23
+++ gdb/testsuite/gdb.mi/mi-var-display.exp 1 Apr 2008 13:50:37 -0000
@@ -329,17 +329,17 @@
# #
##### #####
-# Stop in "do_special_tests"
+# Stop at the end of "do_special_tests"
-set line_dst_a_1 [gdb_get_line_number "a = 1;"]
+set line_dst_incr_a_2 [gdb_get_line_number "incr_a(2);"]
-mi_gdb_test "200-break-insert do_special_tests" \
- "200\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_special_tests\",file=\".*var-cmd.c\",line=\"$line_dst_a_1\",times=\"0\"\}" \
+mi_gdb_test "200-break-insert $line_dst_incr_a_2" \
+ "200\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_special_tests\",file=\".*var-cmd.c\",line=\"$line_dst_incr_a_2\",times=\"0\"\}" \
"break-insert operation"
send_gdb "-exec-continue\n"
gdb_expect {
- -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"2\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_special_tests\",args=\\\[\\\],file=\".*var-cmd.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$line_dst_a_1\"\}\r\n$mi_gdb_prompt$" {
+ -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"2\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_special_tests\",args=\\\[\\\],file=\".*var-cmd.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$line_dst_incr_a_2\"\}\r\n$mi_gdb_prompt$" {
pass "continue to do_special_tests"
}
timeout {
Index: gdb/testsuite/gdb.mi/mi2-var-display.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-var-display.exp,v
retrieving revision 1.16
diff -u -r1.16 mi2-var-display.exp
--- gdb/testsuite/gdb.mi/mi2-var-display.exp 26 Mar 2008 13:36:51 -0000 1.16
+++ gdb/testsuite/gdb.mi/mi2-var-display.exp 1 Apr 2008 13:50:37 -0000
@@ -331,15 +331,15 @@
# Stop in "do_special_tests"
-set line_dst_a_1 [gdb_get_line_number "a = 1;"]
+set line_dst_incr_a_2 [gdb_get_line_number "incr_a(2);"]
-mi_gdb_test "200-break-insert do_special_tests" \
- "200\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_special_tests\",file=\".*var-cmd.c\",line=\"$line_dst_a_1\",times=\"0\"\}" \
+mi_gdb_test "200-break-insert $line_dst_incr_a_2" \
+ "200\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_special_tests\",file=\".*var-cmd.c\",line=\"$line_dst_incr_a_2\",times=\"0\"\}" \
"break-insert operation"
send_gdb "-exec-continue\n"
gdb_expect {
- -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"2\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_special_tests\",args=\\\[\\\],file=\".*var-cmd.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$line_dst_a_1\"\}\r\n$mi_gdb_prompt$" {
+ -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"2\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_special_tests\",args=\\\[\\\],file=\".*var-cmd.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$line_dst_incr_a_2\"\}\r\n$mi_gdb_prompt$" {
pass "continue to do_special_tests"
}
timeout {