* lib/gdb.exp (gdb_test_multiple): Handle return -code return.
* gdb.base/sigaltstack.exp (finish_test): Consume output until
the prompt.
* gdb.base/sigstep.exp: Add KFAIL for gdb/1736.
+2004-08-08 Daniel Jacobowitz <dan@debian.org>
+
+ PR gdb/1736
+ * lib/gdb.exp (gdb_test_multiple): Handle return -code return.
+ * gdb.base/sigaltstack.exp (finish_test): Consume output until
+ the prompt.
+ * gdb.base/sigstep.exp: Add KFAIL for gdb/1736.
+
2004-08-08 Daniel Jacobowitz <dan@debian.org>
* gdb.cp/templates.exp: Handle (char)115 for template argument 's'.
}
proc finish_test { pattern msg } {
+ global gdb_prompt
+
gdb_test_multiple "finish" $msg {
- -re "Cannot insert breakpoint 0" {
+ -re "Cannot insert breakpoint 0.*${gdb_prompt} $" {
# 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.
set test "$i into signal trampoline"
gdb_test_multiple "$i" "${test}" {
+ -re "Cannot insert breakpoint 0.*${gdb_prompt} $" {
+ # 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 "$test (could not set breakpoint)"
+ return
+ }
-re "done = 1;.*${gdb_prompt} $" {
send_gdb "$i\n"
exp_continue
}
set result 0
- gdb_expect $tmt $code
+ set code [catch {gdb_expect $tmt $code} string]
+ if {$code == 1} {
+ global errorInfo errorCode;
+ return -code error -errorinfo $errorInfo -errorcode $errorCode $string
+ } elseif {$code == 2} {
+ return -code return $string
+ } elseif {$code == 3} {
+ return
+ } elseif {$code > 4} {
+ return -code $code $string
+ }
return $result
}