1 # Copyright 1998, 1999, 2007, 2008, 2009 Free Software Foundation, Inc.
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
24 set testfile "structs2"
25 set srcfile ${testfile}.c
26 set binfile ${objdir}/${subdir}/${testfile}
28 # Create and source the file that provides information about the compiler
29 # used to compile the test case.
30 if [get_compiler_info ${binfile}] {
34 # build the first test case
35 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
36 # built the second test case since we can't use prototypes
37 warning "Prototypes not supported, rebuilding with -DNO_PROTOTYPES"
38 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DNO_PROTOTYPES}] != "" } {
45 # Start with a fresh gdb.
48 gdb_reinitialize_dir $srcdir/$subdir
51 gdb_test "set width 0" ""
53 if { ![runto_main] } then {
57 # Ok, we're finally ready to actually do our tests.
64 "structs2 sanity check"
66 gdb_test "break param_reg" \
67 "Breakpoint .* at .*" \
68 "structs2 breakpoint set"
70 if [test_compiler_info gcc-3-*] {
71 setup_xfail hppa*-* gcc/15860
74 ".*pr_char=120.*pr_uchar=130.*pr_short=32000.*pr_ushort=33000.*bkpt = 1.*" \
77 if [test_compiler_info gcc-3-*] {
78 setup_xfail hppa*-* gcc/15860
81 ".*pr_char=-126.*pr_uchar=120.*pr_short=-32536.*pr_ushort=32000.*bkpt = 1.*" \
86 gdb_stop_suppressing_tests