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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [gdb/] [testsuite/] [gdb.base/] [regs.exp] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
# Tests of register displays for GDB.
2
#   Copyright 1994, 1995 Free Software Foundation, Inc.
3
 
4
# This program is free software; you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation; either version 2 of the License, or
7
# (at your option) any later version.
8
#
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
# GNU General Public License for more details.
13
#
14
# You should have received a copy of the GNU General Public License
15
# along with this program; if not, write to the Free Software
16
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
 
18
# Please email any bugs, comments, and/or additions to this file to:
19
# bug-gdb@prep.ai.mit.edu
20
 
21
# This file was written by Stan Shebs. (shebs@cygnus.com)
22
 
23
# This does not (yet) have an associated executable, since the IDT board
24
# will display registers even without a program being loaded.
25
# A more comprehensive register test would actually test reading
26
# and writing of registers in a real program, although some care
27
# would be required in the writing of the tests.
28
 
29
if $tracelevel then {
30
        strace $tracelevel
31
        }
32
 
33
# These tests exercise IDT-specific MIPS registers for several
34
# different processor models.
35
 
36
# This should detect the actual processor in use and change
37
# the expected results appropriately.  FIXME
38
 
39
proc idt_register_tests { } {
40
        # Test the generic IDT chip.
41
        gdb_test "info registers" ".*"
42
        gdb_test "info register zero" "zero(r0): 0x0;"
43
        # FIXME access each generic register individually
44
        # Test the 3041.
45
        gdb_test "set processor r3041" ".*"
46
        gdb_test "info registers" ".*"
47
        gdb_test "info register bus"  "bus.*0x.*"
48
        gdb_test "info register ccfg" "ccfg.*0x.*"
49
        gdb_test "info register port" "port.*0x.*"
50
        gdb_test "info register cmp"  "cmp.*0x.*"
51
        gdb_test "info register elo"  "elo: invalid register"
52
        gdb_test "info register ehi"  "ehi: invalid register"
53
        gdb_test "info register cfg"  "cfg: invalid register"
54
        gdb_test "info register ctxt" "ctxt: invalid register"
55
        # Test the 3051.
56
        gdb_test "set processor r3051" ".*"
57
        gdb_test "info registers" ".*"
58
        gdb_test "info register bus"  "bus: invalid register"
59
        gdb_test "info register ccfg" "ccfg: invalid register"
60
        gdb_test "info register port" "port: invalid register"
61
        gdb_test "info register cmp"  "cmp: invalid register"
62
        gdb_test "info register elo"  "elo.*0x.*"
63
        gdb_test "info register ehi"  "ehi.*0x.*"
64
        gdb_test "info register cfg"  "cfg: invalid register"
65
        gdb_test "info register ctxt" "ctxt: invalid register"
66
        # Test the 3071.
67
        gdb_test "set processor r3071" ".*"
68
        gdb_test "info registers" ".*"
69
        gdb_test "info register bus"  "bus: invalid register"
70
        gdb_test "info register ccfg" "ccfg: invalid register"
71
        gdb_test "info register port" "port: invalid register"
72
        gdb_test "info register cmp"  "cmp: invalid register"
73
        gdb_test "info register elo"  "elo.*0x.*"
74
        gdb_test "info register ehi"  "ehi.*0x.*"
75
        gdb_test "info register cfg"  "cfg.*0x.*"
76
        gdb_test "info register ctxt" "ctxt.*0x.*"
77
}
78
 
79
if [istarget "mips*-idt-*"] then {
80
    gdb_exit
81
    gdb_start
82
    gdb_reinitialize_dir $srcdir/$subdir
83
    idt_register_tests
84
} else {
85
    verbose "regs.exp tests ignored for this target"
86
}

powered by: WebSVN 2.1.0

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