set tests "call $n ${testfile}"
# Call fun${n}, checking the printed return-value.
- setup_kfails structs-*tld* i*86-*-* gdb/1447
- setup_kfails structs-*tld* sparc64-*-* gdb/1447
- setup_kfails structs-*tld* sparc*-*-solaris2* gdb/1447
- setup_kfails structs-*tld* x86_64-*-* gdb/1447
setup_compiler_kfails structs-tc-* gcc-3-3 "DWARF 2" i*86-*-* gdb/1455
gdb_test "p/c fun${n}()" "[foo ${n}]" "p/c fun<n>(); ${tests}"
# examining that global to confirm that the value is as expected.
gdb_test "call Fun${n}(foo${n})" "" "call Fun<n>(foo<n>); ${tests}"
- setup_kfails structs-*tld* i*86-*-* gdb/1447
- setup_kfails structs-*tld* sparc64-*-* gdb/1447
- setup_kfails structs-*tld* sparc*-*-solaris2* gdb/1447
- setup_kfails structs-*tld* x86_64-*-* gdb/1447
setup_compiler_kfails structs-tc-* gcc-3-3 "DWARF 2" i*86-*-* gdb/1455
gdb_test "p/c L${n}" [foo ${n}] "p/c L<n>; ${tests}"
}
"advance to fun<n> for return; ${tests}"
# Check that the program invalidated the relevant global.
- setup_kfails structs-tld i*86-*-* gdb/1447
- setup_kfails structs-tld sparc64-*-* gdb/1447
- setup_kfails structs-tld sparc*-*-solaris2* gdb/1447
- setup_kfails structs-tld x86_64-*-* gdb/1447
gdb_test "p/c L${n}" " = [zed $n]" "zed L<n> for return; ${tests}"
# Force the "return". This checks that the return is always
# "return_value_known" set above.
set test "value foo<n> returned; ${tests}"
- setup_kfails structs-*tld* i*86-*-* gdb/1447
- setup_kfails structs-*tld* sparc64-*-* gdb/1447
- setup_kfails structs-*tld* sparc*-*-solaris2* gdb/1447
- setup_kfails structs-*tld* x86_64-*-* gdb/1447
gdb_test_multiple "p/c L${n}" "${test}" {
-re " = [foo ${n}].*${gdb_prompt} $" {
if $return_value_known {
"advance to fun<n> for finish; ${tests}"
# Check that the program invalidated the relevant global.
- setup_kfails structs-tld i*86-*-* gdb/1447
- setup_kfails structs-tld sparc64-*-* gdb/1447
- setup_kfails structs-tld sparc*-*-solaris2* gdb/1447
- setup_kfails structs-tld x86_64-*-* gdb/1447
gdb_test "p/c L${n}" " = [zed $n]" "zed L<n> for finish; ${tests}"
# Finish the function, set 'finish_value_known" to non-empty if
# "p/c". If no return value was found, the 'Z' from the previous
# check that the variable was cleared, is printed.
set test "value foo<n> finished; ${tests}"
- setup_kfails structs-*tld* i*86-*-* gdb/1447
- setup_kfails structs-*tld* sparc64-*-* gdb/1447
- setup_kfails structs-*tld* sparc*-*-solaris2* gdb/1447
- setup_kfails structs-*tld* x86_64-*-* gdb/1447
gdb_test_multiple "p/c" "${test}" {
-re "[foo ${n}]\[\r\n\]+${gdb_prompt} $" {
if $finish_value_known {