# SYS_pipe doesn't exist on aarch64 kernel.
set test "check SYS_pipe"
set have_SYS_pipe 0
+ set SYS_pipe -1
gdb_test_multiple "p pipe_syscall" $test {
- -re -wrap " = $decimal" {
+ -re -wrap " = ($decimal)" {
pass $test
set have_SYS_pipe 1
+ set SYS_pipe $expect_out(1,string)
}
-re -wrap "No symbol .*" {
pass $test
set test "check SYS_pipe2"
set have_SYS_pipe2 0
+ set SYS_pipe2 -1
gdb_test_multiple "p pipe2_syscall" $test {
- -re -wrap " = $decimal" {
+ -re -wrap " = ($decimal)" {
pass $test
set have_SYS_pipe2 1
+ set SYS_pipe2 $expect_out(1,string)
}
-re -wrap "No symbol .*" {
pass $test
gdb_test "break $line"
gdb_continue_to_breakpoint "before pipe call"
if { $have_SYS_pipe } {
- gdb_test "catch syscall pipe"
+ gdb_test "catch syscall $SYS_pipe"
}
if { $have_SYS_pipe2 } {
- gdb_test "catch syscall pipe2"
+ gdb_test "catch syscall $SYS_pipe2"
}
set ok 0
gdb_test_multiple "continue" "" {
- -re -wrap "Catchpoint $decimal \\(call to syscall pipe\\).*" {
+ -re -wrap "Catchpoint $decimal \\(call to syscall (pipe|$SYS_pipe)\\).*" {
lappend all_syscalls pipe
pass $gdb_test_name
set ok 1
}
- -re -wrap "Catchpoint $decimal \\(call to syscall pipe2\\).*" {
+ -re -wrap "Catchpoint $decimal \\(call to syscall (pipe2|$SYS_pipe)\\).*" {
lappend all_syscalls pipe2
pass $gdb_test_name
set ok 1