Fix nullptr in with_command_1
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / funcargs.exp
index e5b6ced2b52c47d3a632217124cfe7e7a614ca42..6a2a03ab8f1d8ec9bc0f9340b123a2212a86a18a 100644 (file)
@@ -1,4 +1,4 @@
-# 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
@@ -29,8 +29,9 @@ if [get_compiler_info] {
     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
 }
 
@@ -1013,6 +1014,13 @@ proc localvars_in_indirect_call { } {
     #
 
     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"
        }
@@ -1131,15 +1139,9 @@ gdb_test_multiple "print sizeof (int)" "getting sizeof int" {
     }
 }
 
-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
@@ -1148,7 +1150,7 @@ gdb_test_no_output "set print frame-arguments all"
 
 integral_args
 unsigned_integral_args
-if {![target_info exists gdb,skip_float_tests]} {
+if {!$skip_float_test} {
   float_and_integral_args
 }
 
@@ -1158,7 +1160,7 @@ if [support_complex_tests] {
 
     complex_integral_args
 
-    if {![target_info exists gdb,skip_float_tests]} {
+    if {!$skip_float_test} {
        complex_float_integral_args
     }
 }
This page took 0.025132 seconds and 4 git commands to generate.