1 # Tests of register displays for GDB.
2 # Copyright 1994-1995, 2007-2012 Free Software Foundation, Inc.
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.
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.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # This file was written by Stan Shebs. (shebs@cygnus.com)
19 # This does not (yet) have an associated executable, since the IDT board
20 # will display registers even without a program being loaded.
21 # A more comprehensive register test would actually test reading
22 # and writing of registers in a real program, although some care
23 # would be required in the writing of the tests.
29 # These tests exercise IDT-specific MIPS registers for several
30 # different processor models.
32 # This should detect the actual processor in use and change
33 # the expected results appropriately. FIXME
35 proc idt_register_tests { } {
36 # Test the generic IDT chip.
37 gdb_test "info registers" ".*"
38 gdb_test "info register zero" "zero(r0): 0x0;"
39 # FIXME access each generic register individually
41 gdb_test "set processor r3041" ".*"
42 gdb_test "info registers" ".*"
43 gdb_test "info register bus" "bus.*0x.*"
44 gdb_test "info register ccfg" "ccfg.*0x.*"
45 gdb_test "info register port" "port.*0x.*"
46 gdb_test "info register cmp" "cmp.*0x.*"
47 gdb_test "info register elo" "elo: invalid register"
48 gdb_test "info register ehi" "ehi: invalid register"
49 gdb_test "info register cfg" "cfg: invalid register"
50 gdb_test "info register ctxt" "ctxt: invalid register"
52 gdb_test "set processor r3051" ".*"
53 gdb_test "info registers" ".*"
54 gdb_test "info register bus" "bus: invalid register"
55 gdb_test "info register ccfg" "ccfg: invalid register"
56 gdb_test "info register port" "port: invalid register"
57 gdb_test "info register cmp" "cmp: invalid register"
58 gdb_test "info register elo" "elo.*0x.*"
59 gdb_test "info register ehi" "ehi.*0x.*"
60 gdb_test "info register cfg" "cfg: invalid register"
61 gdb_test "info register ctxt" "ctxt: invalid register"
63 gdb_test "set processor r3071" ".*"
64 gdb_test "info registers" ".*"
65 gdb_test "info register bus" "bus: invalid register"
66 gdb_test "info register ccfg" "ccfg: invalid register"
67 gdb_test "info register port" "port: invalid register"
68 gdb_test "info register cmp" "cmp: invalid register"
69 gdb_test "info register elo" "elo.*0x.*"
70 gdb_test "info register ehi" "ehi.*0x.*"
71 gdb_test "info register cfg" "cfg.*0x.*"
72 gdb_test "info register ctxt" "ctxt.*0x.*"
75 if [istarget "mips*-idt-*"] then {
78 gdb_reinitialize_dir $srcdir/$subdir
81 verbose "regs.exp tests ignored for this target"