gdb_test_no_output "tstart" "start trace experiment"
- gdb_test "continue" \
- ".*Breakpoint \[0-9\]+, end .*" \
- "advance through tracing"
+ # Fast tracepoint can be set in signal handler, so gdb_collect in
+ # IPA shouldn't call any non-async-signal-safe functions. It is
+ # impractical to list all non-async-signal-safe functions, and set
+ # breakpoints on them, so choose malloc only in this test.
+ gdb_test "b -q malloc"
+
+ # Performance-wise, gdb_collect in IPA shouldn't call any syscall
+ # in order to keep fast tracepoint fast enough.
+ global gdb_prompt
+ set test "catch syscall"
+ gdb_test_multiple $test $test {
+ -re "The feature \'catch syscall\' is not supported.*\r\n$gdb_prompt $" {
+ }
+ -re ".*$gdb_prompt $" {
+ pass $test
+ }
+ }
+
+ global decimal
+ set test "advance through tracing"
+ gdb_test_multiple "continue" $test {
+ -re "Thread 2 .* hit Catchpoint $decimal \\(call to syscall .*\\).*\r\n$gdb_prompt $" {
+ # IPA starts a helper thread, which calls accept. Ignore it.
+ send_gdb "continue\n"
+ exp_continue
+ }
+ -re "Breakpoint $decimal, end .*$gdb_prompt $" {
+ pass $test
+ }
+ }
gdb_test "tstatus" ".*Trace .*" "check on trace status"