PR gdb/1736
authorDaniel Jacobowitz <drow@false.org>
Sun, 8 Aug 2004 23:14:33 +0000 (23:14 +0000)
committerDaniel Jacobowitz <drow@false.org>
Sun, 8 Aug 2004 23:14:33 +0000 (23:14 +0000)
* gdb.base/sigaltstack.exp (finish_test): New procedure.  KFAIL
for i?86-*-linux*.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/sigaltstack.exp

index 3cc7d2a4c568ed2bed8947cf95d5b03faca8274e..c373022c14a118095ac8c208cd01bf8786976b5c 100644 (file)
@@ -1,3 +1,9 @@
+2004-08-08  Daniel Jacobowitz  <dan@debian.org>
+
+       PR gdb/1736
+       * gdb.base/sigaltstack.exp (finish_test): New procedure.  KFAIL
+       for i?86-*-linux*.
+
 2004-08-08  Daniel Jacobowitz  <dan@debian.org>
 
        * gdb.arch/i386-prologue.exp: Compile without debug information.
index 8f09ccf572079eb03bf2037ab825f0a59edab8c1..3b32d08d7504cbb8a6e0dd24ace992436d55c8d4 100644 (file)
@@ -78,11 +78,26 @@ gdb_expect_list "backtrace" ".*$gdb_prompt $" {
     "\[\r\n\]+.7 \[^\r\n\]* main .*"
 }
 
+proc finish_test { pattern msg } {
+    gdb_test_multiple "finish" $msg {
+       -re "Cannot insert breakpoint 0" {
+           # Some platforms use a special read-only page for signal
+           # trampolines.  We can't set a breakpoint there, and we
+           # don't gracefully fall back to single-stepping.
+           setup_kfail "i?86-*-linux*" gdb/1736
+           fail "$msg (could not set breakpoint)"
+       }
+       -re "$pattern" {
+           pass $msg
+       }
+    }
+}
+
 # Finish?
-gdb_test "finish" "signal handler called." "finish from catch LEAF"
-gdb_test "finish" "thrower .next_level=INNER, .*" "finish to throw INNER"
-gdb_test "finish" "catcher .*" "finish to catch INNER"
-gdb_test "finish" "signal handler called.*" "finish from catch INNER"
-gdb_test "finish" "thrower .next_level=OUTER, .*" "finish to OUTER"
-gdb_test "finish" "catcher .*" "finish to catch MAIN"
-gdb_test "finish" "main .*" "finish to MAIN"
+finish_test "signal handler called." "finish from catch LEAF"
+finish_test "thrower .next_level=INNER, .*" "finish to throw INNER"
+finish_test "catcher .*" "finish to catch INNER"
+finish_test "signal handler called.*" "finish from catch INNER"
+finish_test "thrower .next_level=OUTER, .*" "finish to OUTER"
+finish_test "catcher .*" "finish to catch MAIN"
+finish_test "main .*" "finish to MAIN"