+2014-03-21 Maciej W. Rozycki <macro@codesourcery.com>
+
+ * gdb.threads/thread-specific.exp: Handle the lack of usable
+ $this_breakpoint and $this_thread.
+
2014-03-21 Hui Zhu <hui@codesourcery.com>
* gdb.base/attach.exp (do_command_attach_tests): New.
gdb_breakpoint "$line thread $thread"
}
+set this_breakpoint -1
gdb_test_multiple "continue" "continue to thread-specific breakpoint" {
-re "Breakpoint $main_breakpoint, .* at .*\r\n$gdb_prompt $" {
fail "continue to thread-specific breakpoint (wrong breakpoint)"
}
}
-gdb_test_multiple "info breakpoint $this_breakpoint" "info on bp" {
- -re ".*stop only in thread (\[0-9\]*).*$gdb_prompt $" {
- set this_thread $expect_out(1,string)
- pass "found breakpoint for thread number"
+set this_thread -1
+if { $this_breakpoint != -1 } {
+ gdb_test_multiple "info breakpoint $this_breakpoint" "info on bp" {
+ -re ".*stop only in thread (\[0-9\]*).*$gdb_prompt $" {
+ set this_thread $expect_out(1,string)
+ pass "found breakpoint for thread number"
+ }
}
+} else {
+ untested "info on bp"
}
-gdb_test {print $_thread} ".* = $this_thread" "thread var at break"
+if { $this_thread != -1 } {
+ gdb_test {print $_thread} ".* = $this_thread" "thread var at break"
+} else {
+ untested "thread var at break"
+}
return 0