aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog7
-rw-r--r--gdb/testsuite/gdb.base/condbreak.exp31
2 files changed, 36 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 021466f..fddb912 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2009-11-24 Daniel Jacobowitz <dan@codesourcery.com>
+
+ PR gdb/8704
+
+ * gdb.base/condbreak.exp: Test combinations of "break *EXP",
+ "if", and "thread". Correct matching in the previous test.
+
2009-11-25 Daniel Jacobowitz <dan@codesourcery.com>
* gdb.cp/extern-c.cc, gdb.cp/extern-c.exp: New test.
diff --git a/gdb/testsuite/gdb.base/condbreak.exp b/gdb/testsuite/gdb.base/condbreak.exp
index 2fdeb69..8a9dfbc 100644
--- a/gdb/testsuite/gdb.base/condbreak.exp
+++ b/gdb/testsuite/gdb.base/condbreak.exp
@@ -207,10 +207,10 @@ gdb_expect {
setup_xfail hppa2.0w-*-* 11512CLLbs
send_gdb "continue\n"
gdb_expect {
- -re "Continuing\\..*Breakpoint \[0-9\]+, marker2 \\(a=43\\) at .*$srcfile1:($bp_location8|$bp_location9).*($bp_location8|$bp_location9)\[\t \]+.*" {
+ -re "Continuing\\..*Breakpoint \[0-9\]+, marker2 \\(a=43\\) at .*$srcfile1:($bp_location8|$bp_location9).*($bp_location8|$bp_location9)\[\t \]+.*$gdb_prompt $" {
pass "run until breakpoint at marker2"
}
- -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker2 \\(a=43\\) at .*$srcfile1:($bp_location8|$bp_location9).*($bp_location8|$bp_location9)\[\t \]+.*" {
+ -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker2 \\(a=43\\) at .*$srcfile1:($bp_location8|$bp_location9).*($bp_location8|$bp_location9)\[\t \]+.*$gdb_prompt $" {
xfail "run until breakpoint at marker2"
}
-re "$gdb_prompt $" {
@@ -220,3 +220,30 @@ gdb_expect {
fail "(timeout) run until breakpoint at marker2"
}
}
+
+# Test combinations of conditional and thread-specific breakpoints.
+gdb_test "break main if (1==1) thread 999" \
+ "Unknown thread 999\\."
+gdb_test "break main thread 999 if (1==1)" \
+ "Unknown thread 999\\."
+
+# Verify that both if and thread can be distinguished from a breakpoint
+# address expression.
+gdb_test "break *main if (1==1) thread 999" \
+ "Unknown thread 999\\."
+gdb_test "break *main thread 999 if (1==1)" \
+ "Unknown thread 999\\."
+
+# Similarly for task.
+gdb_test "break *main if (1==1) task 999" \
+ "Unknown task 999\\."
+gdb_test "break *main task 999 if (1==1)" \
+ "Unknown task 999\\."
+
+# GDB accepts abbreviations for "thread" and "task".
+gdb_test "break *main if (1==1) t 999" \
+ "Unknown thread 999\\."
+gdb_test "break *main if (1==1) th 999" \
+ "Unknown thread 999\\."
+gdb_test "break *main if (1==1) ta 999" \
+ "Unknown task 999\\."