-# Copyright 2004-2014 Free Software Foundation, Inc.
+# Copyright 2004-2020 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
set binfile ${objdir}/${subdir}/${testfile}
# Note we have to compile WITH optimization and WITHOUT debugging information to expose the bug.
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {"additional_flags=-O2"}] != "" } {
- untested gdb1558.exp
+ untested "failed to compile"
return -1
}
gdb_run_cmd
-gdb_expect 30 {
+set test "hits breakpoint at main after function called from main"
+gdb_test_multiple "" $test {
-re "Breakpoint 1.*main .*$gdb_prompt $" {
- pass "Hits breakpoint at main after function called from main"
+ pass $test
}
-re "Breakpoint 2.*sub1 .*$gdb_prompt $" {
- kfail "gdb/1558" "Hits breakpoint at main after function called from main"
- }
- -re "$gdb_prompt $" {
- fail "Hits breakpoint at main after function called from main"
- }
- timeout {
- fail "Hits breakpoint at main after function called from main (timeout)"
+ kfail "gdb/1558" $test
}
}