summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-03-03 14:21:00 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-03-03 14:21:00 +0000
commit21a83a9eb884c4d597eb8d86ad995cbec725d10c (patch)
treee6cf96423ef430831f59c126c288f00f6653c028 /gdb/testsuite/gdb.cp
parent205cde58b01bf903bb0952332703c7f591da385b (diff)
downloadgdb-21a83a9eb884c4d597eb8d86ad995cbec725d10c.tar.gz
gdb/
* breakpoint.c (set_condition_evaluation_mode): Set CONDITION_EVALUATION_MODE unconditionally. gdb/testsuite/ Implement testsuite workaround for PR breakpoints/13781. * gdb.cp/mb-templates.exp: New loop with variable $workaround. (set breakpoint condition-evaluation host): New conditional command.
Diffstat (limited to 'gdb/testsuite/gdb.cp')
-rw-r--r--gdb/testsuite/gdb.cp/mb-templates.exp37
1 files changed, 24 insertions, 13 deletions
diff --git a/gdb/testsuite/gdb.cp/mb-templates.exp b/gdb/testsuite/gdb.cp/mb-templates.exp
index d386c029098..e909543d363 100644
--- a/gdb/testsuite/gdb.cp/mb-templates.exp
+++ b/gdb/testsuite/gdb.cp/mb-templates.exp
@@ -38,24 +38,35 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
return -1
}
-clean_restart ${executable}
+# If GDB crashes try it again workarounding PR breakpoints/13781.
-set bp_location [gdb_get_line_number "set breakpoint here"]
+foreach workaround [list "" " (workaround)"] {
+ clean_restart ${executable}
-# Set a breakpoint with multiple locations
-# and a condition.
+ if {${workaround} != ""} {
+ gdb_test_no_output "set breakpoint condition-evaluation host"
+ }
-gdb_test "break $srcfile:$bp_location if i==1" \
- "Breakpoint.*at.*: $srcfile:$bp_location. \\(2 locations\\).*" \
- "initial condition: set breakpoint"
+ set bp_location [gdb_get_line_number "set breakpoint here"]
-gdb_run_cmd
+ # Set a breakpoint with multiple locations
+ # and a condition.
-set test "initial condition: run to breakpoint"
-gdb_test_multiple "" $test {
- -re "Breakpoint \[0-9\]+,.*foo<int> \\(i=1\\).*$gdb_prompt $" {
- pass $test
- break
+ gdb_test "break $srcfile:$bp_location if i==1" \
+ "Breakpoint.*at.*: $srcfile:$bp_location. \\(2 locations\\).*" \
+ "initial condition: set breakpoint$workaround"
+
+ gdb_run_cmd
+
+ if {${workaround} == "" && [is_remote target]} {
+ setup_kfail breakpoints/13781 "*-*-*"
+ }
+ set test "initial condition: run to breakpoint$workaround"
+ gdb_test_multiple "" $test {
+ -re "Breakpoint \[0-9\]+,.*foo<int> \\(i=1\\).*$gdb_prompt $" {
+ pass $test
+ break
+ }
}
}