]>
Commit | Line | Data |
---|---|---|
1d506c26 | 1 | # Copyright 2011-2024 Free Software Foundation, Inc. |
bfccc43c YQ |
2 | # This program is free software; you can redistribute it and/or modify |
3 | # it under the terms of the GNU General Public License as published by | |
4 | # the Free Software Foundation; either version 3 of the License, or | |
5 | # (at your option) any later version. | |
6 | # | |
7 | # This program is distributed in the hope that it will be useful, | |
8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
10 | # GNU General Public License for more details. | |
11 | # | |
12 | # You should have received a copy of the GNU General Public License | |
13 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
14 | ||
4ec70201 | 15 | load_lib "trace-support.exp" |
bfccc43c | 16 | |
d6195dc9 | 17 | require allow_shlib_tests |
bfccc43c | 18 | |
fbee47e0 | 19 | require gdb_trace_common_supports_arch |
8bca2978 | 20 | |
497a5eb0 | 21 | standard_testfile |
bfccc43c YQ |
22 | set libfile1 "pendshr1" |
23 | set libfile2 "pendshr2" | |
24 | set executable $testfile | |
bfccc43c YQ |
25 | set libsrc1 $srcdir/$subdir/$libfile1.c |
26 | set libsrc2 $srcdir/$subdir/$libfile2.c | |
497a5eb0 TT |
27 | set lib_sl1 [standard_output_file $libfile1.sl] |
28 | set lib_sl2 [standard_output_file $libfile2.sl] | |
bfccc43c YQ |
29 | |
30 | set lib_opts [gdb_target_symbol_prefix_flags] | |
31 | ||
32 | if { [gdb_compile_shlib $libsrc1 $lib_sl1 $lib_opts] != "" | |
33 | || [gdb_compile_shlib $libsrc2 $lib_sl2 $lib_opts] != ""} { | |
84c93cd5 | 34 | untested "failed to compile shared library" |
bfccc43c YQ |
35 | return -1 |
36 | } | |
37 | ||
38 | set exec_opts [list debug shlib=$lib_sl1 shlib_load] | |
39 | if { [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] != "" } { | |
84c93cd5 | 40 | untested "failed to compile" |
bfccc43c YQ |
41 | return -1 |
42 | } | |
43 | ||
44 | clean_restart $executable | |
45 | ||
d9019901 SM |
46 | gdb_load_shlib $lib_sl1 |
47 | gdb_load_shlib $lib_sl2 | |
bfccc43c YQ |
48 | |
49 | if ![runto_main] { | |
bfccc43c YQ |
50 | return -1 |
51 | } | |
52 | ||
53 | if ![gdb_target_supports_trace] { | |
bc6c7af4 | 54 | unsupported "current target does not support trace" |
ae59b1da | 55 | return -1 |
bfccc43c YQ |
56 | } |
57 | ||
58 | # Verify pending tracepoint is resolved to running to main. | |
59 | ||
0a251e08 YQ |
60 | proc pending_tracepoint_resolved { trace_type } { |
61 | with_test_prefix "$trace_type resolved" { | |
62 | global srcdir | |
63 | global subdir | |
64 | global binfile | |
65 | global srcfile | |
66 | global lib_sl1 | |
67 | ||
68 | # Start with a fresh gdb. | |
a7e727ae | 69 | clean_restart |
0a251e08 YQ |
70 | |
71 | gdb_test_multiple "$trace_type set_point1" "set pending tracepoint" { | |
72 | -re ".*Make \(fast |\)tracepoint pending.*y or \\\[n\\\]. $" { | |
73 | gdb_test "y" "\(Fast t|T\)racepoint.*set_point1.*pending." \ | |
74 | "set pending tracepoint (without symbols)" | |
75 | } | |
bfccc43c | 76 | } |
bfccc43c | 77 | |
0a251e08 YQ |
78 | gdb_test "info trace" \ |
79 | "Num Type\[ \]+Disp Enb Address\[ \]+What.* | |
bfccc43c | 80 | \[0-9\]+\[\t \]+\(fast |\)tracepoint\[ \]+keep y.*PENDING.*set_point1.*" \ |
0a251e08 | 81 | "single pending tracepoint info (without symbols)" |
bfccc43c | 82 | |
0a251e08 | 83 | gdb_load ${binfile} |
bfccc43c | 84 | |
e777225b | 85 | gdb_test "break -q main" "Breakpoint.*at.* file .*$srcfile, line.*" \ |
0a251e08 | 86 | "breakpoint function" |
bfccc43c | 87 | |
0a251e08 YQ |
88 | gdb_run_cmd |
89 | gdb_test "" "Breakpoint 2, main.*" | |
bfccc43c | 90 | |
0a251e08 YQ |
91 | # Run to main which should resolve a pending tracepoint |
92 | gdb_test "info trace" \ | |
93 | "Num Type\[ \]+Disp Enb Address\[ \]+What.* | |
bfccc43c | 94 | \[0-9\]+\[\t \]+\(fast |\)tracepoint\[ \]+keep y.*pendfunc.*" \ |
0a251e08 YQ |
95 | "single tracepoint info" |
96 | } | |
97 | } | |
bfccc43c YQ |
98 | |
99 | # Verify pending tracepoint is resolved and works as expected. | |
100 | ||
0a251e08 YQ |
101 | proc pending_tracepoint_works { trace_type } { |
102 | with_test_prefix "$trace_type works" { | |
103 | global executable | |
104 | global srcfile | |
105 | global lib_sl1 | |
106 | global gdb_prompt | |
bfccc43c | 107 | |
0a251e08 YQ |
108 | # Restart with a fresh gdb. |
109 | clean_restart $executable | |
bfccc43c | 110 | |
0a251e08 | 111 | # Test setting and querying pending tracepoints |
bfccc43c | 112 | |
0a251e08 YQ |
113 | gdb_test_multiple "$trace_type set_point1" "set pending tracepoint" { |
114 | -re ".*Make \(fast |\)tracepoint pending.*y or \\\[n\\\]. $" { | |
115 | gdb_test "y" \ | |
116 | "\(Fast t|T\)racepoint.*set_point1.*pending." \ | |
117 | "set pending tracepoint" | |
118 | } | |
bfccc43c | 119 | } |
bfccc43c | 120 | |
0a251e08 YQ |
121 | gdb_test "info trace" \ |
122 | "Num Type\[ \]+Disp Enb Address\[ \]+What.* | |
bfccc43c | 123 | \[0-9\]+\[\t \]+\(fast |\)tracepoint\[ \]+keep y.*PENDING.*set_point1.*" \ |
0a251e08 | 124 | "single pending tracepoint info" |
bfccc43c | 125 | |
0a251e08 | 126 | # Run to main which should resolve a pending tracepoint |
e777225b | 127 | gdb_test "break -q main" "Breakpoint.*at.* file .*$srcfile, line.*" \ |
0a251e08 YQ |
128 | "breakpoint function" |
129 | gdb_run_cmd | |
130 | gdb_test "" "Breakpoint 2, main.*" | |
bfccc43c | 131 | |
0a251e08 YQ |
132 | gdb_test "break marker" "Breakpoint.*at.* file .*$srcfile, line.*" \ |
133 | "breakpoint on marker" | |
bfccc43c | 134 | |
0a251e08 YQ |
135 | set test "start trace experiment" |
136 | gdb_test_multiple "tstart" $test { | |
137 | -re "^tstart\r\n$gdb_prompt $" { | |
138 | pass $test | |
139 | } | |
140 | -re "Target returns error code .* too far .*$gdb_prompt $" { | |
141 | if [string equal $trace_type "ftrace"] { | |
142 | # The target was unable to install the fast tracepoint | |
143 | # (e.g., jump pad too far from tracepoint). | |
144 | pass "$test (too far)" | |
145 | # Skip the rest of the tests. | |
146 | return | |
147 | } else { | |
148 | fail $test | |
149 | } | |
f4647387 | 150 | } |
f4647387 | 151 | |
0a251e08 | 152 | } |
bfccc43c | 153 | |
bd0a71fa | 154 | gdb_test "continue" "Continuing.\r\n\r\n(Thread .* hit )?Breakpoint.*marker.*at.*$srcfile.*" \ |
0a251e08 | 155 | "continue to marker" |
f4647387 | 156 | |
1f7f972f | 157 | gdb_test_no_output "tstop" "stop trace experiment" |
bfccc43c | 158 | |
0a251e08 YQ |
159 | gdb_test "tfind start" "#0 .*" "tfind test frame 0" |
160 | gdb_test "tfind" "Found trace frame 1, tracepoint 1.*" \ | |
161 | "tfind test frame 1" | |
162 | gdb_test "tfind" "Found trace frame 2, tracepoint 1.*" \ | |
163 | "tfind test frame 2" | |
164 | gdb_test "tfind" \ | |
165 | "Target failed to find requested trace frame..*" \ | |
166 | "tfind test frame" | |
167 | } | |
168 | } | |
bfccc43c YQ |
169 | |
170 | # Verify pending tracepoint is resolved during trace. | |
171 | ||
6a5870ce | 172 | proc pending_tracepoint_resolved_during_trace { trace_type } \ |
0f4d39d5 | 173 | { with_test_prefix "$trace_type resolved_in_trace" \ |
6a5870ce | 174 | { |
bfccc43c YQ |
175 | global executable |
176 | global srcfile | |
177 | global gdb_prompt | |
178 | global lib_sl1 | |
bfccc43c YQ |
179 | |
180 | # Start with a fresh gdb. | |
181 | clean_restart $executable | |
182 | if ![runto_main] { | |
bfccc43c YQ |
183 | return -1 |
184 | } | |
185 | ||
186 | gdb_test_multiple "$trace_type set_point2" "set pending tracepoint on set_point2" { | |
187 | -re ".*Make \(fast |\)tracepoint pending.*y or \\\[n\\\]. $" { | |
188 | gdb_test "y" "\(Fast t|T\)racepoint.*set_point2.*pending." \ | |
189 | "set pending tracepoint (without symbols)" | |
190 | } | |
191 | } | |
192 | ||
193 | gdb_test "info trace" \ | |
194 | "Num Type\[ \]+Disp Enb Address\[ \]+What.* | |
195 | \[0-9\]+\[\t \]+\(fast |\)tracepoint\[ \]+keep y.*PENDING.*set_point2.*" \ | |
196 | "single pending tracepoint on set_point2" | |
197 | ||
198 | gdb_test "break marker" "Breakpoint.*at.* file .*$srcfile, line.*" \ | |
199 | "breakpoint on marker" | |
200 | ||
201 | gdb_test_no_output "tstart" "start trace experiment" | |
202 | ||
bd0a71fa | 203 | gdb_test "continue" "Continuing.\r\n\r\n(Thread .* hit )?Breakpoint.*marker.*at.*pending.c.*" \ |
bfccc43c YQ |
204 | "continue to marker 1" |
205 | ||
f4647387 YQ |
206 | set test "continue to marker 2" |
207 | gdb_test_multiple "continue" $test { | |
208 | -re "Target returns error code .* too far .*$gdb_prompt $" { | |
209 | if [string equal $trace_type "ftrace"] { | |
210 | # Expected if the target was unable to install the | |
211 | # fast tracepoint (e.g., jump pad too far from | |
212 | # tracepoint). | |
213 | pass "$test (too far)" | |
214 | # Skip the rest of the tests. | |
215 | return | |
216 | } else { | |
217 | fail $test | |
218 | } | |
bfccc43c | 219 | } |
cc5fd9ab | 220 | -re "Continuing.\r\n(Reading .* from remote target...\r\n)?\r\n(Thread .* hit )?Breakpoint.*marker.*at.*$srcfile.*$gdb_prompt $" { |
f4647387 | 221 | pass $test |
bfccc43c YQ |
222 | } |
223 | } | |
224 | ||
1f7f972f | 225 | gdb_test_no_output "tstop" "stop trace experiment" |
bfccc43c YQ |
226 | |
227 | # tracepoint should be resolved. | |
228 | gdb_test "info trace" \ | |
229 | "Num Type\[ \]+Disp Enb Address\[ \]+What.* | |
230 | \[0-9\]+\[\t \]+\(fast |\)tracepoint\[ \]+keep y.*pendfunc2.*" \ | |
231 | "tracepoint is resolved" | |
232 | ||
233 | gdb_test "tfind start" "#0 .*" "tfind test frame 0" | |
234 | gdb_test "tfind" "Target failed to find requested trace frame..*" "tfind test frame" | |
6a5870ce | 235 | }} |
bfccc43c YQ |
236 | |
237 | # Verify pending tracepoint is resolved and installed during trace. | |
238 | ||
6a5870ce | 239 | proc pending_tracepoint_installed_during_trace { trace_type } \ |
0f4d39d5 | 240 | { with_test_prefix "$trace_type installed_in_trace" \ |
6a5870ce | 241 | { |
bfccc43c YQ |
242 | global executable |
243 | global srcfile | |
244 | global lib_sl1 | |
245 | global gdb_prompt | |
bfccc43c YQ |
246 | global hex |
247 | ||
bfccc43c YQ |
248 | # Start with a fresh gdb. |
249 | clean_restart $executable | |
250 | if ![runto_main] { | |
bfccc43c YQ |
251 | return -1 |
252 | } | |
253 | ||
254 | gdb_test "next" ".*" | |
255 | gdb_test "trace main" "Tracepoint \[0-9\] at .*" "set tracepoint on main" | |
256 | ||
257 | gdb_test "break marker" "Breakpoint.*at.* file .*$srcfile, line.*" \ | |
258 | "breakpoint on marker" | |
259 | ||
260 | gdb_test_no_output "tstart" "start trace experiment" | |
261 | ||
bd0a71fa | 262 | gdb_test "continue" "Continuing.\r\n\r\n(Thread .* hit )?Breakpoint.*marker.*at.*${srcfile}.*" \ |
bfccc43c YQ |
263 | "continue to marker 1" |
264 | ||
265 | # Set a pending tracepoint during a tracing experiment. | |
266 | gdb_test_multiple "$trace_type set_point2" "set pending tracepoint on set_point2" { | |
267 | -re ".*Make \(fast |\)tracepoint pending.*y or \\\[n\\\]. $" { | |
268 | gdb_test "y" "\(Fast t|T\)racepoint.*set_point2.*pending." \ | |
269 | "set pending tracepoint" | |
270 | } | |
271 | } | |
272 | ||
273 | gdb_test "info trace" \ | |
274 | "Num Type\[ \]+Disp Enb Address\[ \]+What.* | |
275 | \[0-9\]+\[\t \]+\(fast |\)tracepoint\[ \t\]+keep y.*PENDING.*set_point2.*" \ | |
276 | "single pending tracepoint on set_point2" | |
277 | ||
f4647387 YQ |
278 | set test "continue to marker 2" |
279 | gdb_test_multiple "continue" $test { | |
280 | -re "Target returns error code .* too far .*$gdb_prompt $" { | |
281 | if [string equal $trace_type "ftrace"] { | |
282 | # Expected if the target was unable to install the | |
283 | # fast tracepoint (e.g., jump pad too far from | |
284 | # tracepoint). | |
285 | pass "$test (too far)" | |
286 | # Skip the rest of the tests. | |
287 | return | |
288 | } else { | |
289 | fail $test | |
290 | } | |
bfccc43c | 291 | } |
bd0a71fa | 292 | -re "Continuing.\r\n(Reading .* from remote target...\r\n)?\r\n(Thread .* hit )?Breakpoint.*marker.*at.*$srcfile.*$gdb_prompt $" { |
f4647387 YQ |
293 | pass $test |
294 | } | |
bfccc43c YQ |
295 | } |
296 | ||
1f7f972f | 297 | gdb_test_no_output "tstop" "stop trace experiment" |
bfccc43c YQ |
298 | |
299 | # tracepoint should be resolved. | |
300 | gdb_test "info trace" \ | |
301 | "Num Type\[ \]+Disp Enb Address\[ \]+What.* | |
302 | \[0-9\]+\[\t \]+\(fast |\)tracepoint\[ \]+keep y.*pendfunc2.*" \ | |
303 | "tracepoint is resolved" | |
304 | ||
b04fd3be MK |
305 | # powerpc64 shows "in .pendfunc2" here. |
306 | gdb_test "tfind start" "#0 $hex in .?pendfunc2 .*" "tfind test frame 0" | |
bfccc43c | 307 | gdb_test "tfind" "Target failed to find requested trace frame..*" "tfind test frame" |
6a5870ce | 308 | }} |
bfccc43c YQ |
309 | |
310 | ||
311 | # Verify pending tracepoint will no longer work if we disconnect during tracing. | |
312 | ||
6a5870ce | 313 | proc pending_tracepoint_disconnect_during_trace { trace_type } \ |
0f4d39d5 | 314 | { with_test_prefix "$trace_type disconn" \ |
6a5870ce | 315 | { |
bfccc43c YQ |
316 | global executable |
317 | global srcfile | |
318 | global lib_sl1 | |
bfccc43c YQ |
319 | global gdb_prompt |
320 | ||
bfccc43c YQ |
321 | # Start with a fresh gdb. |
322 | clean_restart $executable | |
323 | if ![runto_main] { | |
bfccc43c YQ |
324 | return -1 |
325 | } | |
326 | ||
327 | gdb_test_multiple "trace pendfunc3" "set pending tracepoint on set_point2" { | |
328 | -re ".*Make \(fast |\)tracepoint pending.*y or \\\[n\\\]. $" { | |
329 | gdb_test "y" "\(Fast t|T\)racepoint.*pendfunc3.*pending." \ | |
330 | "set pending tracepoint on pendfun3" | |
331 | } | |
332 | } | |
333 | ||
334 | gdb_test "break marker" "Breakpoint.*at.* file .*$srcfile, line.*" \ | |
335 | "breakpoint on marker" | |
336 | ||
337 | gdb_test_no_output "tstart" "start trace experiment" | |
338 | ||
bd0a71fa | 339 | gdb_test "continue" "Continuing.\r\n\r\n(Thread .* hit )?Breakpoint.*marker.*at.*pending.c.*" \ |
bfccc43c YQ |
340 | "continue to marker" |
341 | ||
342 | set test "disconnect with pending tracepoint" | |
343 | gdb_test_multiple "disconnect" $test { | |
344 | -re "warning: Pending tracepoints will not be resolved while GDB is disconnected.*Trace is running but will stop on detach; detach anyway\\? \\(y or n\\) $" { | |
345 | pass $test | |
346 | ||
347 | set test "disconnected" | |
348 | gdb_test_multiple "y" $test { | |
349 | -re "$gdb_prompt $" { | |
350 | pass "$test" | |
351 | } | |
352 | } | |
353 | } | |
354 | } | |
6a5870ce | 355 | }} |
bfccc43c YQ |
356 | |
357 | ||
358 | # Verify disconnect after pending tracepoint has been resolved. | |
359 | ||
6a5870ce | 360 | proc pending_tracepoint_disconnect_after_resolved { trace_type } \ |
0f4d39d5 | 361 | { with_test_prefix "$trace_type disconn_resolved" \ |
6a5870ce | 362 | { |
bfccc43c YQ |
363 | global executable |
364 | global srcfile | |
365 | global lib_sl1 | |
366 | global gdb_prompt | |
bfccc43c YQ |
367 | |
368 | # Start with a fresh gdb. | |
369 | clean_restart $executable | |
370 | if ![runto_main] { | |
bfccc43c YQ |
371 | return -1 |
372 | } | |
373 | ||
374 | gdb_test_multiple "trace set_point2" "set pending tracepoint on set_point2" { | |
375 | -re ".*Make \(fast |\)tracepoint pending.*y or \\\[n\\\]. $" { | |
376 | gdb_test "y" "\(Fast t|T\)racepoint.*set_point2.*pending." \ | |
377 | "set pending tracepoint on pendfun2" | |
378 | } | |
379 | } | |
380 | ||
381 | gdb_test "break marker" "Breakpoint.*at.* file .*$srcfile, line.*" \ | |
382 | "breakpoint on marker" | |
383 | ||
384 | gdb_test_no_output "tstart" "start trace experiment" | |
385 | ||
bd0a71fa | 386 | gdb_test "continue" "Continuing.\r\n\r\n(Thread .* hit )?Breakpoint.*marker.*at.*pending.c.*" \ |
bfccc43c | 387 | "continue to marker 1" |
bd0a71fa | 388 | gdb_test "continue" "Continuing.\r\n(Reading .* from remote target...\r\n)?\r\n(Thread .* hit )?Breakpoint.*marker.*at.*pending.c.*" \ |
bfccc43c YQ |
389 | "continue to marker 2" |
390 | ||
391 | # There should be no pending tracepoint, so no warning should be emitted. | |
392 | set test "disconnect with resolved tracepoint" | |
393 | gdb_test_multiple "disconnect" $test { | |
394 | -re "warning: Pending tracepoints will not be resolved while GDB is disconnected.*Trace is running but will stop on detach; detach anyway\\? \\(y or n\\) $" { | |
395 | fail $test | |
396 | } | |
397 | -re "Trace is running but will stop on detach; detach anyway\\? \\(y or n\\) $" { | |
398 | pass $test | |
399 | } | |
400 | } | |
401 | set test "disconnected" | |
402 | gdb_test_multiple "y" $test { | |
403 | -re "$gdb_prompt $" { | |
404 | pass "$test" | |
405 | } | |
406 | } | |
6a5870ce | 407 | }} |
bfccc43c YQ |
408 | |
409 | # Verify action works properly in resolved tracepoint. | |
410 | ||
6a5870ce | 411 | proc pending_tracepoint_with_action_resolved { trace_type } \ |
0f4d39d5 | 412 | { with_test_prefix "$trace_type action_resolved" \ |
6a5870ce | 413 | { |
bfccc43c YQ |
414 | global executable |
415 | global srcfile | |
416 | global lib_sl1 | |
417 | global gdb_prompt | |
6e7675a7 | 418 | global pcreg |
bfccc43c YQ |
419 | |
420 | # Start with a fresh gdb. | |
421 | clean_restart $executable | |
422 | if ![runto_main] { | |
bfccc43c YQ |
423 | return -1 |
424 | } | |
425 | ||
426 | gdb_test_multiple "$trace_type set_point2" "set pending tracepoint on set_point2" { | |
427 | -re ".*Make \(fast |\)tracepoint pending.*y or \\\[n\\\]. $" { | |
428 | gdb_test "y" "\(Fast t|T\)racepoint.*set_point2.*pending." \ | |
429 | "set pending tracepoint (without symbols)" | |
430 | } | |
431 | } | |
432 | ||
bfccc43c YQ |
433 | gdb_trace_setactions "set action for pending tracepoint" "" \ |
434 | "collect \$$pcreg" "^$" | |
435 | ||
436 | gdb_test "info trace" \ | |
437 | "Num Type\[ \]+Disp Enb Address\[ \]+What.* | |
438 | \[0-9\]+\[\t \]+\(fast |\)tracepoint\[ \]+keep y.*PENDING.*set_point2.*" \ | |
439 | "single pending tracepoint on set_point2" | |
440 | ||
441 | gdb_test "break marker" "Breakpoint.*at.* file .*$srcfile, line.*" \ | |
442 | "breakpoint on marker" | |
443 | ||
444 | gdb_test_no_output "tstart" "start trace experiment" | |
445 | ||
bd0a71fa | 446 | gdb_test "continue" "Continuing.\r\n\r\n(Thread .* hit )?Breakpoint.*marker.*at.*pending.c.*" \ |
bfccc43c YQ |
447 | "continue to marker 1" |
448 | ||
f4647387 YQ |
449 | set test "continue to marker 2" |
450 | gdb_test_multiple "continue" $test { | |
451 | -re "Target returns error code .* too far .*$gdb_prompt $" { | |
452 | if [string equal $trace_type "ftrace"] { | |
453 | # Expected if the target was unable to install the | |
454 | # fast tracepoint (e.g., jump pad too far from | |
455 | # tracepoint). | |
456 | pass "$test (too far)" | |
457 | # Skip the rest of the tests. | |
458 | return | |
459 | } else { | |
460 | fail $test | |
461 | } | |
462 | } | |
bd0a71fa | 463 | -re "Continuing.\r\n(Reading .* from remote target...\r\n)?\r\n(Thread .* hit )?Breakpoint.*marker.*at.*$srcfile.*$gdb_prompt $" { |
bfccc43c YQ |
464 | pass "continue to marker 2" |
465 | } | |
f4647387 | 466 | |
bfccc43c YQ |
467 | } |
468 | ||
1f7f972f | 469 | gdb_test_no_output "tstop" "stop trace experiment" |
bfccc43c YQ |
470 | |
471 | # tracepoint should be resolved. | |
472 | gdb_test "info trace" \ | |
473 | "Num Type\[ \]+Disp Enb Address\[ \]+What.* | |
474 | \[0-9\]+\[\t \]+\(fast |\)tracepoint\[ \]+keep y.*pendfunc2.*" \ | |
475 | "tracepoint is resolved" | |
476 | ||
477 | gdb_test "tfind start" "#0 .*" "tfind test frame 0" | |
478 | gdb_test "tdump" "Data collected at tracepoint .*, trace frame \[0-9\]:.*\\$${pcreg} = .*" | |
479 | gdb_test "tfind" "Target failed to find requested trace frame..*" "tfind test frame" | |
6a5870ce | 480 | }} |
bfccc43c YQ |
481 | |
482 | pending_tracepoint_resolved "trace" | |
483 | ||
484 | pending_tracepoint_works "trace" | |
485 | ||
486 | pending_tracepoint_resolved_during_trace "trace" | |
487 | ||
488 | pending_tracepoint_disconnect_during_trace "trace" | |
489 | ||
490 | pending_tracepoint_disconnect_after_resolved "trace" | |
491 | ||
492 | pending_tracepoint_with_action_resolved "trace" | |
493 | ||
494 | pending_tracepoint_installed_during_trace "trace" | |
495 | ||
496 | # Re-compile test case with IPA. | |
c0d4d1c0 | 497 | set libipa [get_in_proc_agent] |
d9019901 | 498 | gdb_load_shlib $libipa |
bfccc43c YQ |
499 | |
500 | lappend exec_opts "shlib=$libipa" | |
501 | ||
502 | if { [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] != "" } { | |
84c93cd5 | 503 | untested "failed to compile with in-process agent library" |
bfccc43c YQ |
504 | return -1 |
505 | } | |
506 | ||
507 | pending_tracepoint_resolved "ftrace" | |
508 | pending_tracepoint_works "ftrace" | |
509 | pending_tracepoint_resolved_during_trace "ftrace" | |
510 | pending_tracepoint_disconnect_during_trace "ftrace" | |
511 | pending_tracepoint_disconnect_after_resolved "ftrace" | |
512 | pending_tracepoint_with_action_resolved "ftrace" | |
513 | pending_tracepoint_installed_during_trace "ftrace" |