1 |
106 |
markom |
# Copyright (C) 1998, 1999 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 2 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, write to the Free Software
|
15 |
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
16 |
|
|
|
17 |
|
|
# Please email any bugs, comments, and/or additions to this file to:
|
18 |
|
|
# bug-gdb@prep.ai.mit.edu
|
19 |
|
|
|
20 |
|
|
# written by Elena Zannoni (ezannoni@cygnus.com)
|
21 |
|
|
|
22 |
|
|
# This file is part of the gdb testsuite
|
23 |
|
|
#
|
24 |
|
|
# tests for overloaded member functions. Set breakpoints on
|
25 |
|
|
# overloaded member functions
|
26 |
|
|
#
|
27 |
|
|
|
28 |
|
|
|
29 |
|
|
if $tracelevel then {
|
30 |
|
|
strace $tracelevel
|
31 |
|
|
}
|
32 |
|
|
|
33 |
|
|
#
|
34 |
|
|
# test running programs
|
35 |
|
|
#
|
36 |
|
|
set prms_id 0
|
37 |
|
|
set bug_id 0
|
38 |
|
|
|
39 |
|
|
if { [skip_cplus_tests] } { continue }
|
40 |
|
|
|
41 |
|
|
set testfile "ovldbreak"
|
42 |
|
|
set srcfile ${testfile}.cc
|
43 |
|
|
set binfile ${objdir}/${subdir}/${testfile}
|
44 |
|
|
|
45 |
|
|
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
|
46 |
|
|
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
|
47 |
|
|
}
|
48 |
|
|
|
49 |
|
|
gdb_exit
|
50 |
|
|
gdb_start
|
51 |
|
|
gdb_reinitialize_dir $srcdir/$subdir
|
52 |
|
|
gdb_load ${binfile}
|
53 |
|
|
|
54 |
|
|
# set it up at a breakpoint so we can play with the variable values
|
55 |
|
|
#
|
56 |
|
|
if ![runto_main] then {
|
57 |
|
|
perror "couldn't run to breakpoint"
|
58 |
|
|
continue
|
59 |
|
|
}
|
60 |
|
|
|
61 |
|
|
|
62 |
|
|
|
63 |
|
|
send_gdb "break foo::overload1arg\n"
|
64 |
|
|
gdb_expect {
|
65 |
|
|
-re "\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n\\\[2\\\] foo::overload1arg\\(double\\) at.*$srcfile:121\r\n\\\[3\\\] foo::overload1arg\\(float\\) at.*$srcfile:120\r\n\\\[4\\\] foo::overload1arg\\(unsigned long\\) at.*$srcfile:119\r\n\\\[5\\\] foo::overload1arg\\(long\\) at.*$srcfile:118\r\n\\\[6\\\] foo::overload1arg\\(unsigned int\\) at.*$srcfile:117\r\n\\\[7\\\] foo::overload1arg\\(int\\) at.*$srcfile:116\r\n\\\[8\\\] foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r\n\\\[9\\\] foo::overload1arg\\(short\\) at.*$srcfile:114\r\n\\\[10\\\] foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r\n\\\[11\\\] foo::overload1arg\\(signed char\\) at.*$srcfile:112\r\n\\\[12\\\] foo::overload1arg\\(char\\) at.*$srcfile:111\r\n\\\[13\\\] foo::overload1arg\\(void\\) at.*$srcfile:110\r\n> $" {
|
66 |
|
|
send_gdb "12\n"
|
67 |
|
|
gdb_expect {
|
68 |
|
|
-re "Breakpoint 2 at $hex: file.*$srcfile, line 111.\r\n$gdb_prompt $" {
|
69 |
|
|
pass "set bp on overload1arg(char)" }
|
70 |
|
|
-re ".*$gdb_prompt $" {
|
71 |
|
|
fail "set bp on overload1arg(char) wrong bp reply" }
|
72 |
|
|
timeout {
|
73 |
|
|
fail "(timeout)set bp on overload1arg(char) wrong bp reply" }
|
74 |
|
|
}
|
75 |
|
|
}
|
76 |
|
|
-re ".*$gdb_prompt $" { fail "set bp on overload1arg(char)(wrong menu)" }
|
77 |
|
|
timeout { fail "(timeout)set bp on overload1arg(char)(wrong menu)" }
|
78 |
|
|
}
|
79 |
|
|
|
80 |
|
|
|
81 |
|
|
gdb_test "info break" \
|
82 |
|
|
"Num Type\[\t \]+Disp Enb Address\[\t \]+What.*
|
83 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in main at.*$srcfile:49\r
|
84 |
|
|
\[\t \]+breakpoint already hit 1 time\r
|
85 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(char\\) at.*$srcfile:111" \
|
86 |
|
|
"breakpoint info"
|
87 |
|
|
|
88 |
|
|
|
89 |
|
|
send_gdb "break foo::overload1arg\n"
|
90 |
|
|
gdb_expect {
|
91 |
|
|
-re "\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n\\\[2\\\] foo::overload1arg\\(double\\) at.*$srcfile:121\r\n\\\[3\\\] foo::overload1arg\\(float\\) at.*$srcfile:120\r\n\\\[4\\\] foo::overload1arg\\(unsigned long\\) at.*$srcfile:119\r\n\\\[5\\\] foo::overload1arg\\(long\\) at.*$srcfile:118\r\n\\\[6\\\] foo::overload1arg\\(unsigned int\\) at.*$srcfile:117\r\n\\\[7\\\] foo::overload1arg\\(int\\) at.*$srcfile:116\r\n\\\[8\\\] foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r\n\\\[9\\\] foo::overload1arg\\(short\\) at.*$srcfile:114\r\n\\\[10\\\] foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r\n\\\[11\\\] foo::overload1arg\\(signed char\\) at.*$srcfile:112\r\n\\\[12\\\] foo::overload1arg\\(char\\) at.*$srcfile:111\r\n\\\[13\\\] foo::overload1arg\\(void\\) at.*$srcfile:110\r\n> $" {
|
92 |
|
|
send_gdb "11\n"
|
93 |
|
|
gdb_expect {
|
94 |
|
|
-re "Breakpoint 3 at $hex: file.*$srcfile, line 112.\r\n$gdb_prompt $" {
|
95 |
|
|
pass "set bp on overload1arg(signed char)" }
|
96 |
|
|
-re ".*$gdb_prompt $" {
|
97 |
|
|
fail "set bp on overload1arg(signed char) wrong bp reply" }
|
98 |
|
|
timeout {
|
99 |
|
|
fail "(timeout)set bp on overload1arg(signed char) wrong bp reply" }
|
100 |
|
|
}
|
101 |
|
|
}
|
102 |
|
|
-re ".*$gdb_prompt $" { fail "set bp on overload1arg(signed char)(wrong menu)" }
|
103 |
|
|
timeout { fail "(timeout)set bp on overload1arg(signed char)(wrong menu)" }
|
104 |
|
|
}
|
105 |
|
|
|
106 |
|
|
|
107 |
|
|
gdb_test "info break" \
|
108 |
|
|
"Num Type\[\t \]+Disp Enb Address\[\t \]+What.*
|
109 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in main at.*$srcfile:49\r
|
110 |
|
|
\[\t \]+breakpoint already hit 1 time\r
|
111 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(char\\) at.*$srcfile:111\r
|
112 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(signed char\\) at.*$srcfile:112" \
|
113 |
|
|
"breakpoint info"
|
114 |
|
|
|
115 |
|
|
|
116 |
|
|
|
117 |
|
|
|
118 |
|
|
|
119 |
|
|
send_gdb "break foo::overload1arg\n"
|
120 |
|
|
gdb_expect {
|
121 |
|
|
-re "\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n\\\[2\\\] foo::overload1arg\\(double\\) at.*$srcfile:121\r\n\\\[3\\\] foo::overload1arg\\(float\\) at.*$srcfile:120\r\n\\\[4\\\] foo::overload1arg\\(unsigned long\\) at.*$srcfile:119\r\n\\\[5\\\] foo::overload1arg\\(long\\) at.*$srcfile:118\r\n\\\[6\\\] foo::overload1arg\\(unsigned int\\) at.*$srcfile:117\r\n\\\[7\\\] foo::overload1arg\\(int\\) at.*$srcfile:116\r\n\\\[8\\\] foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r\n\\\[9\\\] foo::overload1arg\\(short\\) at.*$srcfile:114\r\n\\\[10\\\] foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r\n\\\[11\\\] foo::overload1arg\\(signed char\\) at.*$srcfile:112\r\n\\\[12\\\] foo::overload1arg\\(char\\) at.*$srcfile:111\r\n\\\[13\\\] foo::overload1arg\\(void\\) at.*$srcfile:110\r\n> $" {
|
122 |
|
|
send_gdb "10\n"
|
123 |
|
|
gdb_expect {
|
124 |
|
|
-re "Breakpoint 4 at $hex: file.*$srcfile, line 113.\r\n$gdb_prompt $" {
|
125 |
|
|
pass "set bp on overload1arg(unsigned char)" }
|
126 |
|
|
-re ".*$gdb_prompt $" {
|
127 |
|
|
fail "set bp on overload1arg(unsigned char) wrong bp reply" }
|
128 |
|
|
timeout {
|
129 |
|
|
fail "(timeout)set bp on overload1arg(unsigned char) wrong bp reply" }
|
130 |
|
|
}
|
131 |
|
|
}
|
132 |
|
|
-re ".*$gdb_prompt $" { fail "set bp on overload1arg(unsigned char)(wrong menu)" }
|
133 |
|
|
timeout { fail "(timeout)set bp on overload1arg(unsigned char)(wrong menu)" }
|
134 |
|
|
}
|
135 |
|
|
|
136 |
|
|
|
137 |
|
|
|
138 |
|
|
gdb_test "info break" \
|
139 |
|
|
"Num Type\[\t \]+Disp Enb Address\[\t \]+What.*
|
140 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in main at.*$srcfile:49\r
|
141 |
|
|
\[\t \]+breakpoint already hit 1 time\r
|
142 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(char\\) at.*$srcfile:111\r
|
143 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(signed char\\) at.*$srcfile:112\r
|
144 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned char\\) at.*$srcfile:113" \
|
145 |
|
|
"breakpoint info"
|
146 |
|
|
|
147 |
|
|
|
148 |
|
|
|
149 |
|
|
send_gdb "break foo::overload1arg\n"
|
150 |
|
|
gdb_expect {
|
151 |
|
|
-re "\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n\\\[2\\\] foo::overload1arg\\(double\\) at.*$srcfile:121\r\n\\\[3\\\] foo::overload1arg\\(float\\) at.*$srcfile:120\r\n\\\[4\\\] foo::overload1arg\\(unsigned long\\) at.*$srcfile:119\r\n\\\[5\\\] foo::overload1arg\\(long\\) at.*$srcfile:118\r\n\\\[6\\\] foo::overload1arg\\(unsigned int\\) at.*$srcfile:117\r\n\\\[7\\\] foo::overload1arg\\(int\\) at.*$srcfile:116\r\n\\\[8\\\] foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r\n\\\[9\\\] foo::overload1arg\\(short\\) at.*$srcfile:114\r\n\\\[10\\\] foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r\n\\\[11\\\] foo::overload1arg\\(signed char\\) at.*$srcfile:112\r\n\\\[12\\\] foo::overload1arg\\(char\\) at.*$srcfile:111\r\n\\\[13\\\] foo::overload1arg\\(void\\) at.*$srcfile:110\r\n> $" {
|
152 |
|
|
send_gdb "9\n"
|
153 |
|
|
gdb_expect {
|
154 |
|
|
-re "Breakpoint 5 at $hex: file.*$srcfile, line 114.\r\n$gdb_prompt $" {
|
155 |
|
|
pass "set bp on overload1arg(short)" }
|
156 |
|
|
-re ".*$gdb_prompt $" {
|
157 |
|
|
fail "set bp on overload1arg(short) wrong bp reply" }
|
158 |
|
|
timeout {
|
159 |
|
|
fail "(timeout)set bp on overload1arg(short) wrong bp reply" }
|
160 |
|
|
}
|
161 |
|
|
}
|
162 |
|
|
-re ".*$gdb_prompt $" { fail "set bp on overload1arg(short)(wrong menu)" }
|
163 |
|
|
timeout { fail "(timeout)set bp on overload1arg(short)(wrong menu)" }
|
164 |
|
|
}
|
165 |
|
|
|
166 |
|
|
|
167 |
|
|
gdb_test "info break" \
|
168 |
|
|
"Num Type\[\t \]+Disp Enb Address\[\t \]+What.*
|
169 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in main at.*$srcfile:49\r
|
170 |
|
|
\[\t \]+breakpoint already hit 1 time\r
|
171 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(char\\) at.*$srcfile:111\r
|
172 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(signed char\\) at.*$srcfile:112\r
|
173 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r
|
174 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(short\\) at.*$srcfile:114" \
|
175 |
|
|
"breakpoint info"
|
176 |
|
|
|
177 |
|
|
|
178 |
|
|
|
179 |
|
|
send_gdb "break foo::overload1arg\n"
|
180 |
|
|
gdb_expect {
|
181 |
|
|
-re "\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n\\\[2\\\] foo::overload1arg\\(double\\) at.*$srcfile:121\r\n\\\[3\\\] foo::overload1arg\\(float\\) at.*$srcfile:120\r\n\\\[4\\\] foo::overload1arg\\(unsigned long\\) at.*$srcfile:119\r\n\\\[5\\\] foo::overload1arg\\(long\\) at.*$srcfile:118\r\n\\\[6\\\] foo::overload1arg\\(unsigned int\\) at.*$srcfile:117\r\n\\\[7\\\] foo::overload1arg\\(int\\) at.*$srcfile:116\r\n\\\[8\\\] foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r\n\\\[9\\\] foo::overload1arg\\(short\\) at.*$srcfile:114\r\n\\\[10\\\] foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r\n\\\[11\\\] foo::overload1arg\\(signed char\\) at.*$srcfile:112\r\n\\\[12\\\] foo::overload1arg\\(char\\) at.*$srcfile:111\r\n\\\[13\\\] foo::overload1arg\\(void\\) at.*$srcfile:110\r\n> $" {
|
182 |
|
|
send_gdb "8\n"
|
183 |
|
|
gdb_expect {
|
184 |
|
|
-re "Breakpoint 6 at $hex: file.*$srcfile, line 115.\r\n$gdb_prompt $" {
|
185 |
|
|
pass "set bp on overload1arg(unsigned short)" }
|
186 |
|
|
-re ".*$gdb_prompt $" {
|
187 |
|
|
fail "set bp on overload1arg(unsigned short) wrong bp reply" }
|
188 |
|
|
timeout {
|
189 |
|
|
fail "(timeout)set bp on overload1arg(unsigned short) wrong bp reply" }
|
190 |
|
|
}
|
191 |
|
|
}
|
192 |
|
|
-re ".*$gdb_prompt $" { fail "set bp on overload1arg(unsigned short)(wrong menu)" }
|
193 |
|
|
timeout { fail "(timeout)set bp on overload1arg(unsigned short)(wrong menu)" }
|
194 |
|
|
}
|
195 |
|
|
|
196 |
|
|
|
197 |
|
|
gdb_test "info break" \
|
198 |
|
|
"Num Type\[\t \]+Disp Enb Address\[\t \]+What.*
|
199 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in main at.*$srcfile:49\r
|
200 |
|
|
\[\t \]+breakpoint already hit 1 time\r
|
201 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(char\\) at.*$srcfile:111\r
|
202 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(signed char\\) at.*$srcfile:112\r
|
203 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r
|
204 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(short\\) at.*$srcfile:114\r
|
205 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned short\\) at.*$srcfile:115" \
|
206 |
|
|
"breakpoint info"
|
207 |
|
|
|
208 |
|
|
|
209 |
|
|
|
210 |
|
|
send_gdb "break foo::overload1arg\n"
|
211 |
|
|
gdb_expect {
|
212 |
|
|
-re "\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n\\\[2\\\] foo::overload1arg\\(double\\) at.*$srcfile:121\r\n\\\[3\\\] foo::overload1arg\\(float\\) at.*$srcfile:120\r\n\\\[4\\\] foo::overload1arg\\(unsigned long\\) at.*$srcfile:119\r\n\\\[5\\\] foo::overload1arg\\(long\\) at.*$srcfile:118\r\n\\\[6\\\] foo::overload1arg\\(unsigned int\\) at.*$srcfile:117\r\n\\\[7\\\] foo::overload1arg\\(int\\) at.*$srcfile:116\r\n\\\[8\\\] foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r\n\\\[9\\\] foo::overload1arg\\(short\\) at.*$srcfile:114\r\n\\\[10\\\] foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r\n\\\[11\\\] foo::overload1arg\\(signed char\\) at.*$srcfile:112\r\n\\\[12\\\] foo::overload1arg\\(char\\) at.*$srcfile:111\r\n\\\[13\\\] foo::overload1arg\\(void\\) at.*$srcfile:110\r\n> $" {
|
213 |
|
|
send_gdb "7\n"
|
214 |
|
|
gdb_expect {
|
215 |
|
|
-re "Breakpoint 7 at $hex: file.*$srcfile, line 116.\r\n$gdb_prompt $" {
|
216 |
|
|
pass "set bp on overload1arg(int)" }
|
217 |
|
|
-re ".*$gdb_prompt $" {
|
218 |
|
|
fail "set bp on overload1arg(int) wrong bp reply" }
|
219 |
|
|
timeout {
|
220 |
|
|
fail "(timeout)set bp on overload1arg(int) wrong bp reply" }
|
221 |
|
|
}
|
222 |
|
|
}
|
223 |
|
|
-re ".*$gdb_prompt $" { fail "set bp on overload1arg(int)(wrong menu)" }
|
224 |
|
|
timeout { fail "(timeout)set bp on overload1arg(int)(wrong menu)" }
|
225 |
|
|
}
|
226 |
|
|
|
227 |
|
|
|
228 |
|
|
gdb_test "info break" \
|
229 |
|
|
"Num Type\[\t \]+Disp Enb Address\[\t \]+What.*
|
230 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in main at.*$srcfile:49\r
|
231 |
|
|
\[\t \]+breakpoint already hit 1 time\r
|
232 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(char\\) at.*$srcfile:111\r
|
233 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(signed char\\) at.*$srcfile:112\r
|
234 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r
|
235 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(short\\) at.*$srcfile:114\r
|
236 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r
|
237 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(int\\) at.*$srcfile:116" \
|
238 |
|
|
"breakpoint info"
|
239 |
|
|
|
240 |
|
|
|
241 |
|
|
|
242 |
|
|
send_gdb "break foo::overload1arg\n"
|
243 |
|
|
gdb_expect {
|
244 |
|
|
-re "\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n\\\[2\\\] foo::overload1arg\\(double\\) at.*$srcfile:121\r\n\\\[3\\\] foo::overload1arg\\(float\\) at.*$srcfile:120\r\n\\\[4\\\] foo::overload1arg\\(unsigned long\\) at.*$srcfile:119\r\n\\\[5\\\] foo::overload1arg\\(long\\) at.*$srcfile:118\r\n\\\[6\\\] foo::overload1arg\\(unsigned int\\) at.*$srcfile:117\r\n\\\[7\\\] foo::overload1arg\\(int\\) at.*$srcfile:116\r\n\\\[8\\\] foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r\n\\\[9\\\] foo::overload1arg\\(short\\) at.*$srcfile:114\r\n\\\[10\\\] foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r\n\\\[11\\\] foo::overload1arg\\(signed char\\) at.*$srcfile:112\r\n\\\[12\\\] foo::overload1arg\\(char\\) at.*$srcfile:111\r\n\\\[13\\\] foo::overload1arg\\(void\\) at.*$srcfile:110\r\n> $" {
|
245 |
|
|
send_gdb "6\n"
|
246 |
|
|
gdb_expect {
|
247 |
|
|
-re "Breakpoint 8 at $hex: file.*$srcfile, line 117.\r\n$gdb_prompt $" {
|
248 |
|
|
pass "set bp on overload1arg(unsigned int)" }
|
249 |
|
|
-re ".*$gdb_prompt $" {
|
250 |
|
|
fail "set bp on overload1arg(unsigned int) wrong bp reply" }
|
251 |
|
|
timeout {
|
252 |
|
|
fail "(timeout)set bp on overload1arg(unsigned int) wrong bp reply" }
|
253 |
|
|
}
|
254 |
|
|
}
|
255 |
|
|
-re ".*$gdb_prompt $" { fail "set bp on overload1arg(unsigned int)(wrong menu)" }
|
256 |
|
|
timeout { fail "(timeout)set bp on overload1arg(unsigned int)(wrong menu)" }
|
257 |
|
|
}
|
258 |
|
|
|
259 |
|
|
|
260 |
|
|
gdb_test "info break" \
|
261 |
|
|
"Num Type\[\t \]+Disp Enb Address\[\t \]+What.*
|
262 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in main at.*$srcfile:49\r
|
263 |
|
|
\[\t \]+breakpoint already hit 1 time\r
|
264 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(char\\) at.*$srcfile:111\r
|
265 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(signed char\\) at.*$srcfile:112\r
|
266 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r
|
267 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(short\\) at.*$srcfile:114\r
|
268 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r
|
269 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(int\\) at.*$srcfile:116\r
|
270 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned int\\) at.*$srcfile:117" \
|
271 |
|
|
"breakpoint info"
|
272 |
|
|
|
273 |
|
|
|
274 |
|
|
|
275 |
|
|
send_gdb "break foo::overload1arg\n"
|
276 |
|
|
gdb_expect {
|
277 |
|
|
-re "\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n\\\[2\\\] foo::overload1arg\\(double\\) at.*$srcfile:121\r\n\\\[3\\\] foo::overload1arg\\(float\\) at.*$srcfile:120\r\n\\\[4\\\] foo::overload1arg\\(unsigned long\\) at.*$srcfile:119\r\n\\\[5\\\] foo::overload1arg\\(long\\) at.*$srcfile:118\r\n\\\[6\\\] foo::overload1arg\\(unsigned int\\) at.*$srcfile:117\r\n\\\[7\\\] foo::overload1arg\\(int\\) at.*$srcfile:116\r\n\\\[8\\\] foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r\n\\\[9\\\] foo::overload1arg\\(short\\) at.*$srcfile:114\r\n\\\[10\\\] foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r\n\\\[11\\\] foo::overload1arg\\(signed char\\) at.*$srcfile:112\r\n\\\[12\\\] foo::overload1arg\\(char\\) at.*$srcfile:111\r\n\\\[13\\\] foo::overload1arg\\(void\\) at.*$srcfile:110\r\n> $" {
|
278 |
|
|
send_gdb "5\n"
|
279 |
|
|
gdb_expect {
|
280 |
|
|
-re "Breakpoint 9 at $hex: file.*$srcfile, line 118.\r\n$gdb_prompt $" {
|
281 |
|
|
pass "set bp on overload1arg(long)" }
|
282 |
|
|
-re ".*$gdb_prompt $" {
|
283 |
|
|
fail "set bp on overload1arg(long) wrong bp reply" }
|
284 |
|
|
timeout {
|
285 |
|
|
fail "(timeout)set bp on overload1arg(long) wrong bp reply" }
|
286 |
|
|
}
|
287 |
|
|
}
|
288 |
|
|
-re ".*$gdb_prompt $" { fail "set bp on overload1arg(long)(wrong menu)" }
|
289 |
|
|
timeout { fail "(timeout)set bp on overload1arg(long)(wrong menu)" }
|
290 |
|
|
}
|
291 |
|
|
|
292 |
|
|
|
293 |
|
|
gdb_test "info break" \
|
294 |
|
|
"Num Type\[\t \]+Disp Enb Address\[\t \]+What.*
|
295 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in main at.*$srcfile:49\r
|
296 |
|
|
\[\t \]+breakpoint already hit 1 time\r
|
297 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(char\\) at.*$srcfile:111\r
|
298 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(signed char\\) at.*$srcfile:112\r
|
299 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r
|
300 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(short\\) at.*$srcfile:114\r
|
301 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r
|
302 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(int\\) at.*$srcfile:116\r
|
303 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned int\\) at.*$srcfile:117\r
|
304 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(long\\) at.*$srcfile:118" \
|
305 |
|
|
"breakpoint info"
|
306 |
|
|
|
307 |
|
|
|
308 |
|
|
|
309 |
|
|
send_gdb "break foo::overload1arg\n"
|
310 |
|
|
gdb_expect {
|
311 |
|
|
-re "\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n\\\[2\\\] foo::overload1arg\\(double\\) at.*$srcfile:121\r\n\\\[3\\\] foo::overload1arg\\(float\\) at.*$srcfile:120\r\n\\\[4\\\] foo::overload1arg\\(unsigned long\\) at.*$srcfile:119\r\n\\\[5\\\] foo::overload1arg\\(long\\) at.*$srcfile:118\r\n\\\[6\\\] foo::overload1arg\\(unsigned int\\) at.*$srcfile:117\r\n\\\[7\\\] foo::overload1arg\\(int\\) at.*$srcfile:116\r\n\\\[8\\\] foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r\n\\\[9\\\] foo::overload1arg\\(short\\) at.*$srcfile:114\r\n\\\[10\\\] foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r\n\\\[11\\\] foo::overload1arg\\(signed char\\) at.*$srcfile:112\r\n\\\[12\\\] foo::overload1arg\\(char\\) at.*$srcfile:111\r\n\\\[13\\\] foo::overload1arg\\(void\\) at.*$srcfile:110\r\n> $" {
|
312 |
|
|
send_gdb "4\n"
|
313 |
|
|
gdb_expect {
|
314 |
|
|
-re "Breakpoint 10 at $hex: file.*$srcfile, line 119.\r\n$gdb_prompt $" {
|
315 |
|
|
pass "set bp on overload1arg(unsigned long)" }
|
316 |
|
|
-re ".*$gdb_prompt $" {
|
317 |
|
|
fail "set bp on overload1arg(unsigned long) wrong bp reply" }
|
318 |
|
|
timeout {
|
319 |
|
|
fail "(timeout)set bp on overload1arg(unsigned long) wrong bp reply" }
|
320 |
|
|
}
|
321 |
|
|
}
|
322 |
|
|
-re ".*$gdb_prompt $" { fail "set bp on overload1arg(unsigned long)(wrong menu)" }
|
323 |
|
|
timeout { fail "(timeout)set bp on overload1arg(unsigned long)(wrong menu)" }
|
324 |
|
|
}
|
325 |
|
|
|
326 |
|
|
|
327 |
|
|
gdb_test "info break" \
|
328 |
|
|
"Num Type\[\t \]+Disp Enb Address\[\t \]+What.*
|
329 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in main at.*$srcfile:49\r
|
330 |
|
|
\[\t \]+breakpoint already hit 1 time\r
|
331 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(char\\) at.*$srcfile:111\r
|
332 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(signed char\\) at.*$srcfile:112\r
|
333 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r
|
334 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(short\\) at.*$srcfile:114\r
|
335 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r
|
336 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(int\\) at.*$srcfile:116\r
|
337 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned int\\) at.*$srcfile:117\r
|
338 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(long\\) at.*$srcfile:118\r
|
339 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned long\\) at.*$srcfile:119" \
|
340 |
|
|
"breakpoint info"
|
341 |
|
|
|
342 |
|
|
|
343 |
|
|
send_gdb "break foo::overload1arg\n"
|
344 |
|
|
gdb_expect {
|
345 |
|
|
-re "\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n\\\[2\\\] foo::overload1arg\\(double\\) at.*$srcfile:121\r\n\\\[3\\\] foo::overload1arg\\(float\\) at.*$srcfile:120\r\n\\\[4\\\] foo::overload1arg\\(unsigned long\\) at.*$srcfile:119\r\n\\\[5\\\] foo::overload1arg\\(long\\) at.*$srcfile:118\r\n\\\[6\\\] foo::overload1arg\\(unsigned int\\) at.*$srcfile:117\r\n\\\[7\\\] foo::overload1arg\\(int\\) at.*$srcfile:116\r\n\\\[8\\\] foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r\n\\\[9\\\] foo::overload1arg\\(short\\) at.*$srcfile:114\r\n\\\[10\\\] foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r\n\\\[11\\\] foo::overload1arg\\(signed char\\) at.*$srcfile:112\r\n\\\[12\\\] foo::overload1arg\\(char\\) at.*$srcfile:111\r\n\\\[13\\\] foo::overload1arg\\(void\\) at.*$srcfile:110\r\n> $" {
|
346 |
|
|
send_gdb "3\n"
|
347 |
|
|
gdb_expect {
|
348 |
|
|
-re "Breakpoint 11 at $hex: file.*$srcfile, line 120.\r\n$gdb_prompt $" {
|
349 |
|
|
pass "set bp on overload1arg(float)" }
|
350 |
|
|
-re ".*$gdb_prompt $" {
|
351 |
|
|
fail "set bp on overload1arg(float) wrong bp reply" }
|
352 |
|
|
timeout {
|
353 |
|
|
fail "(timeout)set bp on overload1arg(float) wrong bp reply" }
|
354 |
|
|
}
|
355 |
|
|
}
|
356 |
|
|
-re ".*$gdb_prompt $" { fail "set bp on overload1arg(float)(wrong menu)" }
|
357 |
|
|
timeout { fail "(timeout)set bp on overload1arg(float)(wrong menu)" }
|
358 |
|
|
}
|
359 |
|
|
|
360 |
|
|
gdb_test "info break" \
|
361 |
|
|
"Num Type\[\t \]+Disp Enb Address\[\t \]+What.*
|
362 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in main at.*$srcfile:49\r
|
363 |
|
|
\[\t \]+breakpoint already hit 1 time\r
|
364 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(char\\) at.*$srcfile:111\r
|
365 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(signed char\\) at.*$srcfile:112\r
|
366 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r
|
367 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(short\\) at.*$srcfile:114\r
|
368 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r
|
369 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(int\\) at.*$srcfile:116\r
|
370 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned int\\) at.*$srcfile:117\r
|
371 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(long\\) at.*$srcfile:118\r
|
372 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned long\\) at.*$srcfile:119\r
|
373 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(float\\) at.*$srcfile:120" \
|
374 |
|
|
"breakpoint info"
|
375 |
|
|
|
376 |
|
|
|
377 |
|
|
|
378 |
|
|
send_gdb "break foo::overload1arg\n"
|
379 |
|
|
gdb_expect {
|
380 |
|
|
-re "\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n\\\[2\\\] foo::overload1arg\\(double\\) at.*$srcfile:121\r\n\\\[3\\\] foo::overload1arg\\(float\\) at.*$srcfile:120\r\n\\\[4\\\] foo::overload1arg\\(unsigned long\\) at.*$srcfile:119\r\n\\\[5\\\] foo::overload1arg\\(long\\) at.*$srcfile:118\r\n\\\[6\\\] foo::overload1arg\\(unsigned int\\) at.*$srcfile:117\r\n\\\[7\\\] foo::overload1arg\\(int\\) at.*$srcfile:116\r\n\\\[8\\\] foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r\n\\\[9\\\] foo::overload1arg\\(short\\) at.*$srcfile:114\r\n\\\[10\\\] foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r\n\\\[11\\\] foo::overload1arg\\(signed char\\) at.*$srcfile:112\r\n\\\[12\\\] foo::overload1arg\\(char\\) at.*$srcfile:111\r\n\\\[13\\\] foo::overload1arg\\(void\\) at.*$srcfile:110\r\n> $" {
|
381 |
|
|
send_gdb "2\n"
|
382 |
|
|
gdb_expect {
|
383 |
|
|
-re "Breakpoint 12 at $hex: file.*$srcfile, line 121.\r\n$gdb_prompt $" {
|
384 |
|
|
pass "set bp on overload1arg(double)" }
|
385 |
|
|
-re ".*$gdb_prompt $" {
|
386 |
|
|
fail "set bp on overload1arg(double) wrong bp reply" }
|
387 |
|
|
timeout {
|
388 |
|
|
fail "(timeout)set bp on overload1arg(double) wrong bp reply" }
|
389 |
|
|
}
|
390 |
|
|
}
|
391 |
|
|
-re ".*$gdb_prompt $" { fail "set bp on overload1arg(double)(wrong menu)" }
|
392 |
|
|
timeout { fail "(timeout)set bp on overload1arg(double)(wrong menu)" }
|
393 |
|
|
}
|
394 |
|
|
|
395 |
|
|
|
396 |
|
|
gdb_test "info break" \
|
397 |
|
|
"Num Type\[\t \]+Disp Enb Address\[\t \]+What.*
|
398 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in main at.*$srcfile:49\r
|
399 |
|
|
\[\t \]+breakpoint already hit 1 time\r
|
400 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(char\\) at.*$srcfile:111\r
|
401 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(signed char\\) at.*$srcfile:112\r
|
402 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r
|
403 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(short\\) at.*$srcfile:114\r
|
404 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r
|
405 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(int\\) at.*$srcfile:116\r
|
406 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned int\\) at.*$srcfile:117\r
|
407 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(long\\) at.*$srcfile:118\r
|
408 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned long\\) at.*$srcfile:119\r
|
409 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(float\\) at.*$srcfile:120\r
|
410 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(double\\) at.*$srcfile:121" \
|
411 |
|
|
"breakpoint info"
|
412 |
|
|
|
413 |
|
|
|
414 |
|
|
|
415 |
|
|
send_gdb "break foo::overload1arg\n"
|
416 |
|
|
gdb_expect {
|
417 |
|
|
-re "\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n\\\[2\\\] foo::overload1arg\\(double\\) at.*$srcfile:121\r\n\\\[3\\\] foo::overload1arg\\(float\\) at.*$srcfile:120\r\n\\\[4\\\] foo::overload1arg\\(unsigned long\\) at.*$srcfile:119\r\n\\\[5\\\] foo::overload1arg\\(long\\) at.*$srcfile:118\r\n\\\[6\\\] foo::overload1arg\\(unsigned int\\) at.*$srcfile:117\r\n\\\[7\\\] foo::overload1arg\\(int\\) at.*$srcfile:116\r\n\\\[8\\\] foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r\n\\\[9\\\] foo::overload1arg\\(short\\) at.*$srcfile:114\r\n\\\[10\\\] foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r\n\\\[11\\\] foo::overload1arg\\(signed char\\) at.*$srcfile:112\r\n\\\[12\\\] foo::overload1arg\\(char\\) at.*$srcfile:111\r\n\\\[13\\\] foo::overload1arg\\(void\\) at.*$srcfile:110\r\n> $" {
|
418 |
|
|
send_gdb "13\n"
|
419 |
|
|
gdb_expect {
|
420 |
|
|
-re "Breakpoint 13 at $hex: file.*$srcfile, line 110.\r\n$gdb_prompt $" {
|
421 |
|
|
pass "set bp on overload1arg(void)" }
|
422 |
|
|
-re ".*$gdb_prompt $" {
|
423 |
|
|
fail "set bp on overload1arg(void) wrong bp reply" }
|
424 |
|
|
timeout {
|
425 |
|
|
fail "(timeout)set bp on overload1arg(void) wrong bp reply" }
|
426 |
|
|
}
|
427 |
|
|
}
|
428 |
|
|
-re ".*$gdb_prompt $" { fail "set bp on overload1arg(void)(wrong menu)" }
|
429 |
|
|
timeout { fail "(timeout)set bp on overload1arg(void)(wrong menu)" }
|
430 |
|
|
}
|
431 |
|
|
|
432 |
|
|
|
433 |
|
|
gdb_test "info break" \
|
434 |
|
|
"Num Type\[\t \]+Disp Enb Address\[\t \]+What.*
|
435 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in main at.*$srcfile:49\r
|
436 |
|
|
\[\t \]+breakpoint already hit 1 time\r
|
437 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(char\\) at.*$srcfile:111\r
|
438 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(signed char\\) at.*$srcfile:112\r
|
439 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r
|
440 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(short\\) at.*$srcfile:114\r
|
441 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r
|
442 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(int\\) at.*$srcfile:116\r
|
443 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned int\\) at.*$srcfile:117\r
|
444 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(long\\) at.*$srcfile:118\r
|
445 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned long\\) at.*$srcfile:119\r
|
446 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(float\\) at.*$srcfile:120\r
|
447 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(double\\) at.*$srcfile:121\r
|
448 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(void\\) at.*$srcfile:110" \
|
449 |
|
|
"breakpoint info"
|
450 |
|
|
|
451 |
|
|
|
452 |
|
|
|
453 |
|
|
|
454 |
|
|
send_gdb "break foo::overload1arg\n"
|
455 |
|
|
gdb_expect {
|
456 |
|
|
-re "\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n\\\[2\\\] foo::overload1arg\\(double\\) at.*$srcfile:121\r\n\\\[3\\\] foo::overload1arg\\(float\\) at.*$srcfile:120\r\n\\\[4\\\] foo::overload1arg\\(unsigned long\\) at.*$srcfile:119\r\n\\\[5\\\] foo::overload1arg\\(long\\) at.*$srcfile:118\r\n\\\[6\\\] foo::overload1arg\\(unsigned int\\) at.*$srcfile:117\r\n\\\[7\\\] foo::overload1arg\\(int\\) at.*$srcfile:116\r\n\\\[8\\\] foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r\n\\\[9\\\] foo::overload1arg\\(short\\) at.*$srcfile:114\r\n\\\[10\\\] foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r\n\\\[11\\\] foo::overload1arg\\(signed char\\) at.*$srcfile:112\r\n\\\[12\\\] foo::overload1arg\\(char\\) at.*$srcfile:111\r\n\\\[13\\\] foo::overload1arg\\(void\\) at.*$srcfile:110\r\n> $" {
|
457 |
|
|
send_gdb "0\n"
|
458 |
|
|
gdb_expect {
|
459 |
|
|
-re "cancelled\r\n$gdb_prompt $" {
|
460 |
|
|
pass "set bp cancelled" }
|
461 |
|
|
-re ".*$gdb_prompt $" {
|
462 |
|
|
fail "set bp cancelled wrong bp reply" }
|
463 |
|
|
timeout {
|
464 |
|
|
fail "(timeout)set bp cancelled wrong bp reply" }
|
465 |
|
|
}
|
466 |
|
|
}
|
467 |
|
|
-re ".*$gdb_prompt $" { fail "set bp cancelled(wrong menu)" }
|
468 |
|
|
timeout { fail "(timeout)set bp cancelled(wrong menu)" }
|
469 |
|
|
}
|
470 |
|
|
|
471 |
|
|
|
472 |
|
|
|
473 |
|
|
|
474 |
|
|
gdb_test "info break" \
|
475 |
|
|
"Num Type\[\t \]+Disp Enb Address\[\t \]+What.*
|
476 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in main at.*$srcfile:49\r
|
477 |
|
|
\[\t \]+breakpoint already hit 1 time\r
|
478 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(char\\) at.*$srcfile:111\r
|
479 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(signed char\\) at.*$srcfile:112\r
|
480 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r
|
481 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(short\\) at.*$srcfile:114\r
|
482 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r
|
483 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(int\\) at.*$srcfile:116\r
|
484 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned int\\) at.*$srcfile:117\r
|
485 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(long\\) at.*$srcfile:118\r
|
486 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned long\\) at.*$srcfile:119\r
|
487 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(float\\) at.*$srcfile:120\r
|
488 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(double\\) at.*$srcfile:121\r
|
489 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(void\\) at.*$srcfile:110" \
|
490 |
|
|
"breakpoint info"
|
491 |
|
|
|
492 |
|
|
|
493 |
|
|
|
494 |
|
|
|
495 |
|
|
|
496 |
|
|
send_gdb "delete breakpoints\n"
|
497 |
|
|
gdb_expect {
|
498 |
|
|
-re "Delete all breakpoints.*$" {
|
499 |
|
|
send_gdb "y\n"
|
500 |
|
|
gdb_expect {
|
501 |
|
|
-re ".*$gdb_prompt $" {
|
502 |
|
|
send_gdb "info breakpoints\n"
|
503 |
|
|
gdb_expect {
|
504 |
|
|
-re "No breakpoints or watchpoints..*$gdb_prompt $" {
|
505 |
|
|
pass "Deleted all breakpoints"
|
506 |
|
|
}
|
507 |
|
|
-re ".*$gdb_prompt $" { fail "Deleted all breakpoints" }
|
508 |
|
|
timeout { fail "Deleted all breakpoints (timeout)" }
|
509 |
|
|
}
|
510 |
|
|
}
|
511 |
|
|
timeout { fail "Deleted all breakpoints (timeout)" }
|
512 |
|
|
}
|
513 |
|
|
}
|
514 |
|
|
-re ".*$gdb_prompt $" { fail "Deleted all breakpoints" }
|
515 |
|
|
timeout { fail "Deleted all breakpoints (timeout)" }
|
516 |
|
|
}
|
517 |
|
|
|
518 |
|
|
|
519 |
|
|
|
520 |
|
|
|
521 |
|
|
send_gdb "break foo::overload1arg\n"
|
522 |
|
|
gdb_expect {
|
523 |
|
|
-re "\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n\\\[2\\\] foo::overload1arg\\(double\\) at.*$srcfile:121\r\n\\\[3\\\] foo::overload1arg\\(float\\) at.*$srcfile:120\r\n\\\[4\\\] foo::overload1arg\\(unsigned long\\) at.*$srcfile:119\r\n\\\[5\\\] foo::overload1arg\\(long\\) at.*$srcfile:118\r\n\\\[6\\\] foo::overload1arg\\(unsigned int\\) at.*$srcfile:117\r\n\\\[7\\\] foo::overload1arg\\(int\\) at.*$srcfile:116\r\n\\\[8\\\] foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r\n\\\[9\\\] foo::overload1arg\\(short\\) at.*$srcfile:114\r\n\\\[10\\\] foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r\n\\\[11\\\] foo::overload1arg\\(signed char\\) at.*$srcfile:112\r\n\\\[12\\\] foo::overload1arg\\(char\\) at.*$srcfile:111\r\n\\\[13\\\] foo::overload1arg\\(void\\) at.*$srcfile:110\r\n> $" {
|
524 |
|
|
send_gdb "1\n"
|
525 |
|
|
gdb_expect {
|
526 |
|
|
-re "Breakpoint $decimal at $hex: file.*$srcfile, line 121.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 120.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 119.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 118.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 117.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 116.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 115.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 114.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 113.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 112.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 111.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 110.\r\nwarning: Multiple breakpoints were set.\r\nwarning: Use the .delete. command to delete unwanted breakpoints.\r\n$gdb_prompt $" {
|
527 |
|
|
pass "set bp on all overload1arg()" }
|
528 |
|
|
-re ".*$gdb_prompt $" {
|
529 |
|
|
fail "set bp on all overload1arg() wrong bp reply" }
|
530 |
|
|
timeout {
|
531 |
|
|
fail "(timeout)set bp on all overload1arg() wrong bp reply" }
|
532 |
|
|
}
|
533 |
|
|
}
|
534 |
|
|
-re ".*$gdb_prompt $" { fail "set bp on all overload1arg()(wrong menu)" }
|
535 |
|
|
timeout { fail "(timeout)set bp on all overload1arg()(wrong menu)" }
|
536 |
|
|
}
|
537 |
|
|
|
538 |
|
|
|
539 |
|
|
|
540 |
|
|
gdb_test "info break" \
|
541 |
|
|
"Num Type\[\t \]+Disp Enb Address\[\t \]+What.*
|
542 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(double\\) at.*$srcfile:121\r
|
543 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(float\\) at.*$srcfile:120\r
|
544 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned long\\) at.*$srcfile:119\r
|
545 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(long\\) at.*$srcfile:118\r
|
546 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned int\\) at.*$srcfile:117\r
|
547 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(int\\) at.*$srcfile:116\r
|
548 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r
|
549 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(short\\) at.*$srcfile:114\r
|
550 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r
|
551 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(signed char\\) at.*$srcfile:112\r
|
552 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(char\\) at.*$srcfile:111\r
|
553 |
|
|
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex in foo::overload1arg\\(void\\) at.*$srcfile:110" \
|
554 |
|
|
"breakpoint info"
|
555 |
|
|
|
556 |
|
|
|
557 |
|
|
proc continue_to_bp_overloaded {n formals actuals} {
|
558 |
|
|
global gdb_prompt hex decimal srcfile
|
559 |
|
|
send_gdb "cont\n"
|
560 |
|
|
gdb_expect {
|
561 |
|
|
-re "Continuing.\r\n\r\nBreakpoint $n, (${hex} in )?foo::overload1arg \\(this=${hex}(, )?${actuals}\\) at.*$srcfile:${decimal}\r\n${decimal}\[\t \]+int foo::overload1arg \\(${formals}\\).*\r\n$gdb_prompt $" {
|
562 |
|
|
pass "continue to bp overloaded : ${formals}"
|
563 |
|
|
}
|
564 |
|
|
-re "$gdb_prompt $" { fail "continue to bp overloaded : ${formals}" }
|
565 |
|
|
timeout { fail "(timeout) continue to bp overloaded : ${formals}" }
|
566 |
|
|
}
|
567 |
|
|
}
|
568 |
|
|
|
569 |
|
|
continue_to_bp_overloaded 25 "void" ""
|
570 |
|
|
continue_to_bp_overloaded 24 "char arg" "arg=2 \\'\\\\002\\'"
|
571 |
|
|
continue_to_bp_overloaded 23 "signed char arg" "arg=3 \\'\\\\003\\'"
|
572 |
|
|
continue_to_bp_overloaded 22 "unsigned char arg" "arg=4 \\'\\\\004\\'"
|
573 |
|
|
continue_to_bp_overloaded 21 "short arg" "arg=5"
|
574 |
|
|
continue_to_bp_overloaded 20 "unsigned short arg" "arg=6"
|
575 |
|
|
continue_to_bp_overloaded 19 "int arg" "arg=7"
|
576 |
|
|
continue_to_bp_overloaded 18 "unsigned int arg" "arg=8"
|
577 |
|
|
continue_to_bp_overloaded 17 "long arg" "arg=9"
|
578 |
|
|
continue_to_bp_overloaded 16 "unsigned long arg" "arg=10"
|
579 |
|
|
continue_to_bp_overloaded 15 "float arg" "arg=100"
|
580 |
|
|
continue_to_bp_overloaded 14 "double arg" "arg=200"
|
581 |
|
|
|
582 |
|
|
|
583 |
|
|
gdb_continue_to_end "finish program"
|