Detect broken ptrace in gdb_skip_float_test
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / funcargs.exp
index aa88072a7c3d66e34eda35a8a61378e091ea152d..fe04b2f34a2a806373d484ddd6ab50444173b5f3 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1992-2014 Free Software Foundation, Inc.
+# Copyright 1992-2016 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,6 +29,8 @@ if [get_compiler_info] {
     return -1
 }
 
+set skip_float_test [gdb_skip_float_test]
+
 if {[prepare_for_testing $testfile.exp $testfile $srcfile $compile_flags]} {
     untested $testfile.exp
     return -1
@@ -894,19 +896,15 @@ proc recursive_structs_by_value {} {
     gdb_run_cmd
     gdb_test "" "Breakpoint $decimal, hitbottom .*" "run to hitbottom"
 
-    if ![istarget sparclet-*-*] {
-       gdb_test_sequence "backtrace 100" "recursive passing of structs by value" {
-           "\[\r\n\]#0 .* hitbottom \\(\\) "
-           "\[\r\n\]#1 .* recurse \\(a=\{s = 0, i = 0, l = 0\}, depth=0\\) "
-           "\[\r\n\]#2 .* recurse \\(a=\{s = 1, i = 1, l = 1\}, depth=1\\) "
-           "\[\r\n\]#3 .* recurse \\(a=\{s = 2, i = 2, l = 2\}, depth=2\\) "
-           "\[\r\n\]#4 .* recurse \\(a=\{s = 3, i = 3, l = 3\}, depth=3\\) "
-           "\[\r\n\]#5 .* recurse \\(a=\{s = 4, i = 4, l = 4\}, depth=4\\) "
-           "\[\r\n\]#6 .* test_struct_args \\(\\) "
-           "\[\r\n\]#7 .* main \\(.*\\) at "
-       }
-    } else {
-       fail "recursive passing of structs by value (sparclet)"
+    gdb_test_sequence "backtrace 100" "recursive passing of structs by value" {
+       "\[\r\n\]#0 .* hitbottom \\(\\) "
+       "\[\r\n\]#1 .* recurse \\(a=\{s = 0, i = 0, l = 0\}, depth=0\\) "
+       "\[\r\n\]#2 .* recurse \\(a=\{s = 1, i = 1, l = 1\}, depth=1\\) "
+       "\[\r\n\]#3 .* recurse \\(a=\{s = 2, i = 2, l = 2\}, depth=2\\) "
+       "\[\r\n\]#4 .* recurse \\(a=\{s = 3, i = 3, l = 3\}, depth=3\\) "
+       "\[\r\n\]#5 .* recurse \\(a=\{s = 4, i = 4, l = 4\}, depth=4\\) "
+       "\[\r\n\]#6 .* test_struct_args \\(\\) "
+       "\[\r\n\]#7 .* main \\(.*\\) at "
     }
     gdb_stop_suppressing_tests
 }
@@ -1018,9 +1016,9 @@ 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 $" {
-           #On hppa2.0w-hp-hpux11.00, gdb finishes at one line earlier than 
-           #hppa1.1-hp-hpux11.00. Therefore, an extra "step" is necessary 
-           #to continue the test.
+           # 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
        }
@@ -1159,7 +1157,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
 }
 
@@ -1169,7 +1167,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.029125 seconds and 4 git commands to generate.