OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-7.2/] [gdb/] [testsuite/] [gdb.base/] [structs2.exp] - Blame information for rev 414

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 330 jeremybenn
# Copyright 1998, 1999, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
2
 
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.
7
#
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.
12
#
13
# You should have received a copy of the GNU General Public License
14
# along with this program.  If not, see .
15
 
16
if $tracelevel then {
17
        strace $tracelevel
18
}
19
 
20
set prototypes 1
21
set testfile "structs2"
22
set srcfile ${testfile}.c
23
set binfile ${objdir}/${subdir}/${testfile}
24
 
25
# Create and source the file that provides information about the compiler
26
# used to compile the test case.
27
if [get_compiler_info ${binfile}] {
28
    return -1;
29
}
30
 
31
# build the first test case
32
if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
33
    # built the second test case since we can't use prototypes
34
    warning "Prototypes not supported, rebuilding with -DNO_PROTOTYPES"
35
    if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DNO_PROTOTYPES}] != "" } {
36
        untested structs2.exp
37
        return -1
38
    }
39
    set prototypes 0
40
}
41
 
42
# Start with a fresh gdb.
43
 
44
gdb_start
45
gdb_reinitialize_dir $srcdir/$subdir
46
gdb_load ${binfile}
47
 
48
gdb_test_no_output "set width 0"
49
 
50
if { ![runto_main] } then {
51
    gdb_suppress_tests
52
}
53
 
54
# Ok, we're finally ready to actually do our tests.
55
 
56
gdb_test "f" \
57
    ".*bkpt = 0.*" \
58
    "structs2 sanity check"
59
 
60
gdb_test "break param_reg" \
61
    "Breakpoint .* at .*" \
62
    "structs2 breakpoint set"
63
 
64
if [test_compiler_info gcc-3-*] {
65
  setup_xfail hppa*-* gcc/15860
66
}
67
gdb_test "continue" \
68
    ".*pr_char=120.*pr_uchar=130.*pr_short=32000.*pr_ushort=33000.*bkpt = 1.*" \
69
    "structs2 continue1"
70
 
71
if [test_compiler_info gcc-3-*] {
72
  setup_xfail hppa*-* gcc/15860
73
}
74
gdb_test "continue" \
75
    ".*pr_char=-126.*pr_uchar=120.*pr_short=-32536.*pr_ushort=32000.*bkpt = 1.*" \
76
    "structs2 continue2"
77
 
78
# End of tests.
79
 
80
gdb_stop_suppressing_tests
81
 
82
return 0

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.