Update years in copyright notice for the GDB files.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / call-sc.exp
index 77cac7425d38bed3e4633ad9263822f271d92632..24478a443b5fe9df5b6e325126bc7345273b622c 100644 (file)
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2004, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+# Copyright 2004-2013 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
 # Test "return", "finish", and "call" of functions that a scalar (int,
 # float, enum) and/or take a single scalar parameter.
 
-if $tracelevel then {
-       strace $tracelevel
-}
-
 
 # Some targets can't call functions, so don't even bother with this
 # test.
@@ -39,7 +35,7 @@ set binfile ${objdir}/${subdir}/${testfile}
 # Create and source the file that provides information about the
 # compiler used to compile the test case.
 
-if [get_compiler_info ${binfile}] {
+if [get_compiler_info] {
     return -1;
 }
 
@@ -78,12 +74,9 @@ proc start_scalars_test { type } {
     gdb_load ${binfile}
 
     # Make certain that the output is consistent
-    gdb_test "set print sevenbit-strings" "" \
-           "set print sevenbit-strings; ${testfile}"
-    gdb_test "set print address off" "" \
-           "set print address off; ${testfile}"
-    gdb_test "set width 0" "" \
-           "set width 0; ${testfile}"
+    gdb_test_no_output "set print sevenbit-strings"
+    gdb_test_no_output "set print address off"
+    gdb_test_no_output "set width 0"
 
     # Advance to main
     if { ![runto_main] } then {
@@ -96,13 +89,13 @@ proc start_scalars_test { type } {
     # check that type matches what was passed in
     set test "ptype; ${testfile}"
     set foo_t "xxx"
-    gdb_test_multiple "ptype ${type}" "${test}" {
+    gdb_test_multiple "ptype/r ${type}" "${test}" {
        -re "type = (\[^\r\n\]*)\r\n$gdb_prompt $" {
            set foo_t "$expect_out(1,string)"
            pass "$test (${foo_t})"
        }
     }
-    gdb_test "ptype foo" "type = ${foo_t}" "ptype foo; ${testfile} $expect_out(1,string)"
+    gdb_test "ptype/r foo" "type = ${foo_t}" "ptype foo; ${testfile} $expect_out(1,string)"
 }
 
 
@@ -151,7 +144,7 @@ proc test_scalar_calls { } {
     # stores its parameter in the global variable "L".  GDB then
     # examining that global to confirm that the value is as expected.
 
-    gdb_test "call Fun(foo)" "" "call Fun(foo); ${tests}"
+    gdb_test_no_output "call Fun(foo)" "call Fun(foo); ${tests}"
     gdb_test "p/c L" " = 49 '1'" "p/c L; ${tests}"
 }
 
@@ -192,7 +185,7 @@ proc test_scalar_returns { } {
 
     # The relevant code looks like "L{n} = fun{n}()".  The test forces
     # "fun{n}" to "return" with an explicit value.  Since that code
-    # snippet will store the the returned value in "L{n}" the return
+    # snippet will store the returned value in "L{n}" the return
     # is tested by examining "L{n}".  This assumes that the
     # compiler implemented this as fun{n}(&L{n}) and hence that when
     # the value isn't stored "L{n}" remains unchanged.  Also check for
@@ -443,20 +436,22 @@ start_scalars_test tll
 test_scalar_calls
 test_scalar_returns
 
-# Approx size: 4, 8, ...
-start_scalars_test tf
-test_scalar_calls
-test_scalar_returns
-
-# Approx size: 8, 16, ...
-start_scalars_test td
-test_scalar_calls
-test_scalar_returns
-
-# Approx size: 16, 32, ...
-start_scalars_test tld
-test_scalar_calls
-test_scalar_returns
+if ![target_info exists gdb,skip_float_tests] {
+    # Approx size: 4, 8, ...
+    start_scalars_test tf
+    test_scalar_calls
+    test_scalar_returns
+
+    # Approx size: 8, 16, ...
+    start_scalars_test td
+    test_scalar_calls
+    test_scalar_returns
+
+    # Approx size: 16, 32, ...
+    start_scalars_test tld
+    test_scalar_calls
+    test_scalar_returns
+}
 
 # Approx size: 4, 8, ...
 start_scalars_test te
This page took 0.028734 seconds and 4 git commands to generate.