* config/tc-arm.c (arm_cpus): Add entry for ARM Cortex-M0.
[binutils-gdb.git] / gdb / testsuite / gdb.base / structs2.exp
blobf2821e59c3d31ce2df66470f73260055cf04fe97
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/>.
16 if $tracelevel then {
17         strace $tracelevel
20 set prms_id 0
21 set bug_id 0
23 set prototypes 1
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}] {
31     return -1;
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}] != "" } {
39         untested structs2.exp
40         return -1
41     }
42     set prototypes 0
45 # Start with a fresh gdb.
47 gdb_start
48 gdb_reinitialize_dir $srcdir/$subdir
49 gdb_load ${binfile}
51 gdb_test "set width 0" ""
53 if { ![runto_main] } then {
54     gdb_suppress_tests
57 # Ok, we're finally ready to actually do our tests.
59 set prms_id 13536
60 set bug_id 0
62 gdb_test "f" \
63     ".*bkpt = 0.*" \
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
73 gdb_test "continue" \
74     ".*pr_char=120.*pr_uchar=130.*pr_short=32000.*pr_ushort=33000.*bkpt = 1.*" \
75     "structs2 continue1"
77 if [test_compiler_info gcc-3-*] {
78   setup_xfail hppa*-* gcc/15860
80 gdb_test "continue" \
81     ".*pr_char=-126.*pr_uchar=120.*pr_short=-32536.*pr_ushort=32000.*bkpt = 1.*" \
82     "structs2 continue2"
84 # End of tests.
86 gdb_stop_suppressing_tests
88 return 0