testsuite: i386 regression for funcargs.exp
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / whatis.exp
index 40f317ad6804eac9d04fb428a0a1fc92e750bd73..93a4d440ce59da731ad8f1c3bdfbaac695eec1bf 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1988-2013 Free Software Foundation, Inc.
+# Copyright 1988-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
@@ -25,9 +25,8 @@ if [target_info exists no_long_long] {
     set exec_opts [list debug]
 }
 
-set testfile whatis
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile .c
+
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $exec_opts] != "" } {
      untested whatis.exp
      return -1
@@ -41,21 +40,18 @@ if [get_compiler_info] {
 
 # Start with a fresh gdb.
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load $binfile
+clean_restart $binfile
 
 # Define a procedure to set up an xfail for all targets that put out a
 # `long' type as an `int' type.
-# Sun/Ultrix cc have this problem.
+# Sun cc has this problem.
 # It was said that COFF targets can not distinguish int from long either.
 
 proc setup_xfail_on_long_vs_int {} {
     global gcc_compiled
 
     if {!$gcc_compiled} {
-       setup_xfail "*-sun-sunos4*" "*-*-ultrix*" "i*86-sequent-bsd*"
+       setup_xfail "*-sun-sunos4*" "i*86-sequent-bsd*"
     }
 }
 
@@ -71,7 +67,6 @@ gdb_test "whatis v_char" \
     "type = (unsigned char|char)" \
     "whatis char"
 
-if {!$gcc_compiled} then { setup_xfail "mips-sgi-irix*" }
 gdb_test "whatis v_signed_char" \
     "type = (signed char|char)" \
     "whatis signed char"
@@ -286,14 +281,6 @@ gdb_test "whatis v_double_pointer" \
     "whatis double pointer"
 
 
-if { $hp_aCC_compiler } {
-    set unstruct "unnamed\.struct\..*"
-    set ununion "unnamed\.union\..*"
-} else {
-    set unstruct "\.\.\."
-    set ununion "\.\.\."
-}
-
 # test whatis command with structure types
 gdb_test "whatis v_struct1" \
     "type = struct t_struct" \
@@ -304,7 +291,7 @@ gdb_test "whatis struct t_struct" \
     "whatis named structure using type name"
 
 gdb_test "whatis v_struct2" \
-    "type = struct \{$unstruct\}" \
+    "type = struct \{\.\.\.\}" \
     "whatis unnamed structure"
 
 
@@ -318,15 +305,11 @@ gdb_test "whatis union t_union" \
     "whatis named union using type name"
 
 gdb_test "whatis v_union2" \
-    "type = union \{$ununion\}" \
+    "type = union \{\.\.\.\}" \
     "whatis unnamed union"
 
 
-# HP-UX: HP aCC compiler w/ +objdebug option detects language as
-# c++, so we need the 'void' pattern here.
-# Without +objdebug compilation option we still need to match ''.
-# - guo
-# Also, using stabs we will mark these functions as prototyped.  This
+# Using stabs we will mark these functions as prototyped.  This
 # is harmless but causes an extra VOID to be printed.
 set void "(void|)"
 
@@ -433,14 +416,8 @@ gdb_test "whatis nested_su.outer_int" \
     "type = int" \
     "whatis outer structure member"
 
-if {$hp_aCC_compiler} {
-    set outer "outer_struct::"
-} else {
-    set outer ""
-}
-
 gdb_test "whatis nested_su.inner_struct_instance" \
-    "type = struct ${outer}inner_struct" \
+    "type = struct inner_struct" \
     "whatis inner structure"
 
 gdb_test "whatis nested_su.inner_struct_instance.inner_int" \
@@ -448,7 +425,7 @@ gdb_test "whatis nested_su.inner_struct_instance.inner_int" \
     "whatis inner structure member"
 
 gdb_test "whatis nested_su.inner_union_instance" \
-    "type = union ${outer}inner_union" \
+    "type = union inner_union" \
     "whatis inner union"
 
 gdb_test "whatis nested_su.inner_union_instance.inner_union_int" \
This page took 0.026636 seconds and 4 git commands to generate.