From: Jan Kratochvil Date: Tue, 7 Aug 2012 13:14:50 +0000 (+0000) Subject: gdb/testsuite/ X-Git-Tag: gdb_7_5-2012-08-17-release~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a81e9ec4dcf99943058060a03666e8b20f3794bd;p=thirdparty%2Fbinutils-gdb.git gdb/testsuite/ Do not false FAIL with old GCCs. * gdb.base/watchpoint.exp (self-delete local watch) <$no_hw>: XFAIL for GCC < 4.5 in $no_hw mode. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index f7c2763709a..e3b122cc9b9 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2012-08-07 Jan Kratochvil + + Do not false FAIL with old GCCs. + * gdb.base/watchpoint.exp (self-delete local watch) <$no_hw>: XFAIL for + GCC < 4.5 in $no_hw mode. + 2012-08-06 Jan Kratochvil * gdb.base/list.exp (test_only_end): New function. diff --git a/gdb/testsuite/gdb.base/watchpoint.exp b/gdb/testsuite/gdb.base/watchpoint.exp index b7ae2e1fe38..09f23753af2 100644 --- a/gdb/testsuite/gdb.base/watchpoint.exp +++ b/gdb/testsuite/gdb.base/watchpoint.exp @@ -459,7 +459,27 @@ proc test_complex_watchpoint {} { # gdb_test "watch local_a" ".*\[Ww\]atchpoint \[0-9\]*: local_a" "set local watch" gdb_test "cont" "\[Ww\]atchpoint.*local_a.*" "trigger local watch" - gdb_test "cont" "Continuing.*\[Ww\]atchpoint .* deleted because the program has left the block in.*which its expression is valid.*" "self-delete local watch" + + set test "self-delete local watch" + gdb_test_multiple "cont" $test { + -re "Continuing.*\[Ww\]atchpoint .* deleted because the program has left the block in.*which its expression is valid.*\r\n$gdb_prompt $" { + pass $test + } + -re "can't compute CFA for this frame.*\r\n$gdb_prompt $" { + global compiler_info no_hw + + # GCC < 4.5.0 does not get LOCATIONS_VALID set by dwarf2read.c. + # Therefore epilogue unwinder gets applied which is + # incompatible with dwarf2_frame_cfa. + verbose -log "compiler_info: $compiler_info" + if {$no_hw && ([test_compiler_info {gcc-[0-3]-*}] + || [test_compiler_info {gcc-4-[0-4]-*}])} { + xfail "$test (old GCC has broken watchpoints in epilogues)" + return + } + fail $test + } + } gdb_continue_to_breakpoint "func2 breakpoint here" # We should be in "func2" again now. Test a watch of an