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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-6.8/] [gdb/] [testsuite/] [gdb.base/] [regs.exp] - Blame information for rev 24

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

Line No. Rev Author Line
1 24 jeremybenn
# Tests of register displays for GDB.
2
#   Copyright 1994, 1995, 2007, 2008 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 3 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, see .
16
 
17
# Please email any bugs, comments, and/or additions to this file to:
18
# bug-gdb@prep.ai.mit.edu
19
 
20
# This file was written by Stan Shebs. (shebs@cygnus.com)
21
 
22
# This does not (yet) have an associated executable, since the IDT board
23
# will display registers even without a program being loaded.
24
# A more comprehensive register test would actually test reading
25
# and writing of registers in a real program, although some care
26
# would be required in the writing of the tests.
27
 
28
if $tracelevel then {
29
        strace $tracelevel
30
        }
31
 
32
# These tests exercise IDT-specific MIPS registers for several
33
# different processor models.
34
 
35
# This should detect the actual processor in use and change
36
# the expected results appropriately.  FIXME
37
 
38
proc idt_register_tests { } {
39
        # Test the generic IDT chip.
40
        gdb_test "info registers" ".*"
41
        gdb_test "info register zero" "zero(r0): 0x0;"
42
        # FIXME access each generic register individually
43
        # Test the 3041.
44
        gdb_test "set processor r3041" ".*"
45
        gdb_test "info registers" ".*"
46
        gdb_test "info register bus"  "bus.*0x.*"
47
        gdb_test "info register ccfg" "ccfg.*0x.*"
48
        gdb_test "info register port" "port.*0x.*"
49
        gdb_test "info register cmp"  "cmp.*0x.*"
50
        gdb_test "info register elo"  "elo: invalid register"
51
        gdb_test "info register ehi"  "ehi: invalid register"
52
        gdb_test "info register cfg"  "cfg: invalid register"
53
        gdb_test "info register ctxt" "ctxt: invalid register"
54
        # Test the 3051.
55
        gdb_test "set processor r3051" ".*"
56
        gdb_test "info registers" ".*"
57
        gdb_test "info register bus"  "bus: invalid register"
58
        gdb_test "info register ccfg" "ccfg: invalid register"
59
        gdb_test "info register port" "port: invalid register"
60
        gdb_test "info register cmp"  "cmp: invalid register"
61
        gdb_test "info register elo"  "elo.*0x.*"
62
        gdb_test "info register ehi"  "ehi.*0x.*"
63
        gdb_test "info register cfg"  "cfg: invalid register"
64
        gdb_test "info register ctxt" "ctxt: invalid register"
65
        # Test the 3071.
66
        gdb_test "set processor r3071" ".*"
67
        gdb_test "info registers" ".*"
68
        gdb_test "info register bus"  "bus: invalid register"
69
        gdb_test "info register ccfg" "ccfg: invalid register"
70
        gdb_test "info register port" "port: invalid register"
71
        gdb_test "info register cmp"  "cmp: invalid register"
72
        gdb_test "info register elo"  "elo.*0x.*"
73
        gdb_test "info register ehi"  "ehi.*0x.*"
74
        gdb_test "info register cfg"  "cfg.*0x.*"
75
        gdb_test "info register ctxt" "ctxt.*0x.*"
76
}
77
 
78
if [istarget "mips*-idt-*"] then {
79
    gdb_exit
80
    gdb_start
81
    gdb_reinitialize_dir $srcdir/$subdir
82
    idt_register_tests
83
} else {
84
    verbose "regs.exp tests ignored for this target"
85
}

powered by: WebSVN 2.1.0

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