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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gdb-7.1/] [gdb/] [testsuite/] [gdb.arch/] [i386-disp-step.exp] - Blame information for rev 227

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

Line No. Rev Author Line
1 227 jeremybenn
# Copyright 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
# This file is part of the gdb testsuite.
17
 
18
# Test i386 displaced stepping.
19
 
20
if $tracelevel {
21
    strace $tracelevel
22
}
23
 
24
set prms_id 0
25
set bug_id 0
26
 
27
if ![istarget "i?86-*-linux*"] then {
28
    verbose "Skipping x86 displaced stepping tests."
29
    return
30
}
31
 
32
set testfile "i386-disp-step"
33
set srcfile ${testfile}.S
34
set binfile ${objdir}/${subdir}/${testfile}
35
 
36
set additional_flags "-Wa,-g"
37
 
38
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } {
39
    untested i386-disp-step.exp
40
    return -1
41
}
42
 
43
# Get things started.
44
 
45
gdb_exit
46
gdb_start
47
gdb_reinitialize_dir $srcdir/$subdir
48
gdb_load ${binfile}
49
 
50
gdb_test "set displaced-stepping on" ""
51
gdb_test "show displaced-stepping" ".* displaced stepping .* is on.*"
52
 
53
if ![runto_main] then {
54
    fail "Can't run to main"
55
    return 0
56
}
57
 
58
##########################################
59
 
60
# Test call/ret.
61
 
62
gdb_test "break test_call" \
63
    "Breakpoint.*at.* file .*$srcfile, line.*" \
64
    "break test_call"
65
gdb_test "break test_call_end" \
66
    "Breakpoint.*at.* file .*$srcfile, line.*" \
67
    "break test_call_end"
68
 
69
gdb_test "break test_ret" \
70
    "Breakpoint.*at.* file .*$srcfile, line.*" \
71
    "break test_ret"
72
gdb_test "break test_ret_end" \
73
    "Breakpoint.*at.* file .*$srcfile, line.*" \
74
    "break test_ret_end"
75
 
76
gdb_test "continue" \
77
    "Continuing.*Breakpoint.*, test_call ().*" \
78
    "continue to test_call"
79
gdb_test "continue" \
80
    "Continuing.*Breakpoint.*, test_call_end ().*" \
81
    "continue to test_call_end"
82
 
83
gdb_test "continue" \
84
    "Continuing.*Breakpoint.*, test_ret ().*" \
85
    "continue to test_ret"
86
gdb_test "continue" \
87
    "Continuing.*Breakpoint.*, test_ret_end ().*" \
88
    "continue to test_ret_end"
89
 
90
##########################################
91
 
92
# Absolute jump with leading prefixes.
93
# These don't occur in normal code, but gdb should still DTRT.
94
 
95
gdb_test "break test_prefixed_abs_jump" \
96
    "Breakpoint.*at.* file .*$srcfile, line.*" \
97
    "break test_prefixed_abs_jump"
98
gdb_test "break test_prefixed_abs_jump_end" \
99
    "Breakpoint.*at.* file .*$srcfile, line.*" \
100
    "break test_prefixed_abs_jump_end"
101
 
102
gdb_test "continue" \
103
    "Continuing.*Breakpoint.*, test_prefixed_abs_jump ().*" \
104
    "continue to test_prefixed_abs_jump"
105
gdb_test "continue" \
106
    "Continuing.*Breakpoint.*, test_prefixed_abs_jump_end ().*" \
107
    "continue to test_prefixed_abs_jump_end"
108
 
109
##########################################
110
 
111
# Test syscall.
112
 
113
gdb_test "break test_syscall" \
114
    "Breakpoint.*at.* file .*$srcfile, line.*" \
115
    "break test_syscall"
116
gdb_test "break test_syscall_end" \
117
    "Breakpoint.*at.* file .*$srcfile, line.*" \
118
    "break test_syscall_end"
119
 
120
gdb_test "continue" \
121
    "Continuing.*Breakpoint.*, test_syscall ().*" \
122
    "continue to test_syscall"
123
gdb_test "continue" \
124
    "Continuing.*Breakpoint.*, test_syscall_end ().*" \
125
    "continue to test_syscall_end"
126
 
127
##########################################
128
 
129
# Test prefixed syscall.
130
# These don't occur in normal code, but gdb should still DTRT.
131
 
132
gdb_test "break test_prefixed_syscall" \
133
    "Breakpoint.*at.* file .*$srcfile, line.*" \
134
    "break test_prefixed_syscall"
135
gdb_test "break test_prefixed_syscall_end" \
136
    "Breakpoint.*at.* file .*$srcfile, line.*" \
137
    "break test_prefixed_syscall_end"
138
 
139
gdb_test "continue" \
140
    "Continuing.*Breakpoint.*, test_prefixed_syscall ().*" \
141
    "continue to test_prefixed_syscall"
142
gdb_test "continue" \
143
    "Continuing.*Breakpoint.*, test_prefixed_syscall_end ().*" \
144
    "continue to test_prefixed_syscall_end"
145
 
146
##########################################
147
 
148
# int3 (with prefixes)
149
# These don't occur in normal code, but gdb should still DTRT.
150
 
151
gdb_test "break test_int3" \
152
    "Breakpoint.*at.* file .*$srcfile, line.*" \
153
    "break test_int3"
154
gdb_test "break test_int3_end" \
155
    "Breakpoint.*at.* file .*$srcfile, line.*" \
156
    "break test_int3_end"
157
 
158
gdb_test "continue" \
159
    "Continuing.*Breakpoint.*, test_int3 ().*" \
160
    "continue to test_int3"
161
 
162
gdb_test "continue" \
163
    "Continuing.*Breakpoint.*, test_int3_end ().*" \
164
    "continue to test_int3_end"
165
 
166
##########################################
167
 
168
# Done, run program to exit.
169
 
170
gdb_continue_to_end "i386-disp-step"

powered by: WebSVN 2.1.0

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