- send_gdb "p common_routine::hits\n"
- gdb_expect {
- -re ".*= 15\r\n$gdb_prompt $" {
- pass "stopped before calling common_routine 15 times"
- }
- -re ".*= 16\r\n$gdb_prompt $" {
- pass "stopped before calling common_routine 15 times (16 times)"
- }
- -re ".*= 17\r\n$gdb_prompt $" {
- pass "stopped before calling common_routine 15 times (17 times)"
- }
- default {
- fail "stopped before calling common_routine 15 times"
- return 0
- }
- -re ".*$gdb_prompt $" {
- fail "stopped before calling common_routine 15 times"
- return 0
- }
- timeout {
- fail "stopped before calling common_routine 15 times (timeout)"
- return 0
+ gdb_test_multiple "p common_routine::hits" \
+ "stopped before calling common_routine 15 times" {
+ -re ".*= 15\r\n$gdb_prompt $" {
+ pass "stopped before calling common_routine 15 times"
+ }
+ -re ".*= 16\r\n$gdb_prompt $" {
+ pass "stopped before calling common_routine 15 times (16 times)"
+ }
+ -re ".*= 17\r\n$gdb_prompt $" {
+ pass "stopped before calling common_routine 15 times (17 times)"
+ }