-# Copyright 1992-2016 Free Software Foundation, Inc.
+# Copyright 1992-2019 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
return -1
}
-if {[prepare_for_testing $testfile.exp $testfile $srcfile $compile_flags]} {
- untested $testfile.exp
+set skip_float_test [gdb_skip_float_test]
+
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile $compile_flags]} {
return -1
}
#
gdb_test_multiple "finish" "finish from indirectly called function" {
+ -re "\\(\\*pointer_to_call0a\\) \\(c, s, i, l\\);.*First.*$gdb_prompt $" {
+ # If the branch instruction is not the last instruction in the
+ # function call line, we'll stop at that line, and need an extra
+ # "step" to continue the test.
+ send_gdb "step\n"
+ exp_continue
+ }
-re ".*\\(\\*pointer_to_call0a\\) \\(c, s, i, l\\);.*Second.*$gdb_prompt $" {
pass "finish from indirectly called function"
}
}
}
-gdb_test_multiple "show endian" "getting target endian" {
- -re ".*little endian.*$gdb_prompt $" {
- set target_bigendian_p 0
- # pass silently
- }
- -re ".*big endian.*$gdb_prompt $" {
- set target_bigendian_p 1
- # pass silently
- }
+switch [get_endianness] {
+ little { set target_bigendian_p 0 }
+ big { set target_bigendian_p 1 }
}
# Perform tests
integral_args
unsigned_integral_args
-if {![target_info exists gdb,skip_float_tests]} {
+if {!$skip_float_test} {
float_and_integral_args
}
complex_integral_args
- if {![target_info exists gdb,skip_float_tests]} {
+ if {!$skip_float_test} {
complex_float_integral_args
}
}