Fix more cases of improper test names
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / step-line.exp
CommitLineData
618f726f 1# Copyright 2001-2016 Free Software Foundation, Inc.
3207ec21
KB
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
4fcb9948 5# the Free Software Foundation; either version 3 of the License, or
3207ec21 6# (at your option) any later version.
4fcb9948 7#
3207ec21
KB
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.
4fcb9948 12#
3207ec21 13# You should have received a copy of the GNU General Public License
c7b778ff 14# along with this program. If not, see <http://www.gnu.org/licenses/>.
3207ec21 15
3207ec21
KB
16# use this to debug:
17#
18#log_user 1
19
20# step-line.exp -- Expect script to test stepping in files with
21# #line directives.
22
0ab77f5f 23standard_testfile
f24fce77 24set linefile ${testfile}.inp
3207ec21 25
5b362f04 26if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
0ab77f5f 27 return -1
3207ec21
KB
28}
29
3207ec21 30if ![runto_main] then {
bc6c7af4 31 fail "can't run to main"
3207ec21
KB
32 return 0
33}
34
08b3fe69 35set remote_linefile [gdb_remote_download host ${srcdir}/${subdir}/${linefile}]
f24fce77 36
293e2f9e 37gdb_test "break f1" ".*Breakpoint 2 at .* file .*step-line.c.*" "break f1"
3207ec21
KB
38gdb_test "continue" \
39 "Continuing.*Breakpoint 2, f1 \\(i=4\\).*dummy \\(1, i\\);" \
40 "continue to f1"
41gdb_test "next" \
42 ".*i = f2 \\(i\\);.*" \
43 "next over dummy 1"
44gdb_test "next" \
45 ".*dummy \\(2, i\\);.*" \
46 "next to dummy 2"
47gdb_test "next" \
48 ".*i = f2 \\(i\\);.*" \
49 "next over dummy 2"
50gdb_test "step" \
51 ".*f2 \\(i=4\\).*dummy \\(4, i\\);.*" \
52 "step into f2"
53gdb_test "next" \
54 ".*j = i;.*" \
55 "next over dummy 4"
56gdb_test "next" \
57 ".*dummy \\(5, i\\);.*" \
58 "next to dummy 5"
59gdb_test "next" \
60 ".*dummy \\(6, j\\);.*" \
61 "next to dummy 6"
62gdb_test "next" \
63 ".*j = SUCC \\(j\\);.*" \
64 "next over dummy 6"
65gdb_test "next" \
66 ".*dummy \\(7, i\\);.*" \
67 "next to dummy 7"
68gdb_test "next" \
69 ".*dummy \\(8, j\\);.*" \
70 "next to dummy 8"
71gdb_test "next" \
72 ".*j = j - i;.*" \
73 "next over dummy 8"
74gdb_test "next" \
75 ".*dummy \\(9, i\\);.*" \
76 "next to dummy 9"
77gdb_test "next" \
78 ".*dummy \\(10, j\\);.*" \
79 "next to dummy 10"
80gdb_test "next" \
81 ".*RETURN \\(j\\);.*" \
82 "next over dummy 10"
f24fce77 83
3207ec21 84return 0
This page took 1.648137 seconds and 4 git commands to generate.