This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit+7.4] Update Cell test cases for "ambiguous linespec" changes
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 2 Jan 2012 19:22:30 +0100 (CET)
- Subject: [commit+7.4] Update Cell test cases for "ambiguous linespec" changes
Hello,
a couple of gdb.cell/ tests broke after the ambiguous linespec patches
went in. These are:
- "break main" will now automatically break both on the main of the
PowerPC part *and* the main of all SPU contexts. This caused extra
halts for fork.exp and gcore.exp, confusing the tests. Fixed by
deleting the extra breakpoint.
- solib-symbol.exp tries to verify that the default name lookup rules
find the instance of a symbol within the current SPU context, by
preference. The test used to check this by attempting to set a
breakpoint on the symbol. This no longer works, since the breakpoint
now always gets set on *all* instances. Fixed by changing the test
to use "info symbol" instead, which still choses the one "default"
instance of the name.
Tested on Cell/B.E., committed to mainline and 7.4 branch.
Bye,
Ulrich
ChangeLog:
* gdb.cell/fork.exp: Delete breakpoints after reaching main.
* gdb.cell/gcore.exp: Likewise.
* gdb.cell/solib-symbol.exp: Use "info symbol" instead of "break"
to verify the correct instance of main is selected.
Index: gdb/testsuite/gdb.cell/fork.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cell/fork.exp,v
retrieving revision 1.4
diff -u -p -r1.4 fork.exp
--- gdb/testsuite/gdb.cell/fork.exp 6 May 2011 20:48:48 -0000 1.4
+++ gdb/testsuite/gdb.cell/fork.exp 2 Jan 2012 15:16:21 -0000
@@ -61,6 +61,8 @@ if ![runto_main] then {
return 0
}
+delete_breakpoints
+
gdb_test_no_output "set spu stop-on-load" "set spu stop-on-load"
gdb_test "continue" "Continuing\\..*Temporary breakpoint \[0-9\]+, main \\(speid=.*, argp=.*, envp=.*\\) at .*$spu_file\\.c:.*spu_write_out_intr_mbox.*" \
Index: gdb/testsuite/gdb.cell/gcore.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cell/gcore.exp,v
retrieving revision 1.2
diff -u -p -r1.2 gcore.exp
--- gdb/testsuite/gdb.cell/gcore.exp 1 Jan 2011 15:33:43 -0000 1.2
+++ gdb/testsuite/gdb.cell/gcore.exp 2 Jan 2012 15:16:21 -0000
@@ -65,6 +65,8 @@ if ![runto_main] then {
return 0
}
+delete_breakpoints
+
gdb_test "continue" ".*Aborted.*"
set escapedfilename [string_to_regexp ${objdir}/${subdir}/gcore.test]
Index: gdb/testsuite/gdb.cell/solib-symbol.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cell/solib-symbol.exp,v
retrieving revision 1.2
diff -u -p -r1.2 solib-symbol.exp
--- gdb/testsuite/gdb.cell/solib-symbol.exp 1 Jan 2011 15:33:43 -0000 1.2
+++ gdb/testsuite/gdb.cell/solib-symbol.exp 2 Jan 2012 15:16:21 -0000
@@ -61,20 +61,19 @@ if ![runto_main] then {
return 0
}
-# Breakpoint resolved in PPU thread.
-gdb_test "break foo" \
- "Breakpoint.*file.*$ppu_file.c.*" \
- "br foo in break"
+# Symbol resolved in PPU thread.
+gdb_test "info symbol foo" \
+ "foo in section \.text of .*$ppu_file\[\r\n\]+.*" \
+ "info symbol foo in break"
# Continue to SPU
cont_spu_main
check_spu_arch ""
-# Breakpoint resolved in SPU thread.
-delete_breakpoints
-gdb_test "break foo" \
- "Breakpoint.*file.*$spu_file.c.*" \
- "br foo in $spu_file.c"
+# Symbol resolved in SPU thread.
+gdb_test "info symbol foo" \
+ "foo in section \.text of .*$spu_file@.*" \
+ "info symbol foo in break-spu"
gdb_exit
return 0
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com