"set break on ${type}_func"
gdb_test "continue" "Breakpoint.* ${type}_func.*" \
"continue to ${type}_func"
- send_gdb "finish\n"
- gdb_expect {
+ gdb_test_multiple "finish" "finish from ${type}_func" {
-re ".*Value returned is .* = 49 '1'\r\n$gdb_prompt $" {
if { $type == "char" } {
pass "finish from char_func"
-re ".*Value returned is .* = 1\r\n$gdb_prompt $" {
pass "finish from ${type}_func"
}
- -re ".*$gdb_prompt $" {
- fail "finish from ${type}_func"
- }
- timeout {
- fail "finish from ${type}_func (timeout)"
- }
}
}
"set break on void_func"
gdb_test "continue" "Breakpoint.* void_func.*" \
"continue to void_func"
- send_gdb "finish\n"
# Some architectures will have one or more instructions after the
# call instruction which still is part of the call sequence, so we
# must be prepared for a "finish" to show us the void_func call
# again as well as the statement after.
- gdb_expect {
+ gdb_test_multiple "finish" "finish from void_func" {
-re ".*void_checkpoint.*$gdb_prompt $" {
pass "finish from void_func"
}
-re "0x\[0-9a-fA-F\]+ in main.*call to void_func.*$gdb_prompt $" {
pass "finish from void_func"
}
- -re ".*$gdb_prompt $" {
- fail "finish from void_func"
- }
- timeout {
- fail "finish from void_func (timeout)"
- }
}
}