-# 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
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
# 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*"
}
}
"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"
"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" \
"whatis named structure using type name"
gdb_test "whatis v_struct2" \
- "type = struct \{$unstruct\}" \
+ "type = struct \{\.\.\.\}" \
"whatis unnamed structure"
"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|)"
"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" \
"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" \