From ab198279120fe7937c0970a8bb881922726678f9 Mon Sep 17 00:00:00 2001 From: Carl Love Date: Wed, 17 Nov 2021 22:29:33 +0000 Subject: [PATCH] gdb fix for catch-syscall.exp Remove check_continue "execve" from Proc test_catch_syscall_execve. The check_continue proceedure checs that the command, execve, starts and checks for the return from the command. The execve command starts a new program and thus the return from the command causing the test to fail. The call to proc check_continue "execve" is removed and replaced with just the call to check_call_to_syscall "execve" to verify the command executed. The next test in proc test_catch_syscall_execve verifies that the new program started and hit the break point in main. Update the check for the PowerPC architecture. Power Little Endian systems include "le" in the name. The istarget "power64-*-linux*" check fails to match LE sytems. The expected string is updated to capture both Big Endian and Little Endian systems. Power 10 LE istarget prints as: powerpc64le-unknown-linux-gnu. This patch fixes three failures and the error: ERROR: can't read "arch1": no such variable Patch tested on Power 10 ppc64le GNU/Linux platform. --- gdb/testsuite/gdb.base/catch-syscall.exp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.base/catch-syscall.exp b/gdb/testsuite/gdb.base/catch-syscall.exp index 811a92b0aea..016d0a698a6 100644 --- a/gdb/testsuite/gdb.base/catch-syscall.exp +++ b/gdb/testsuite/gdb.base/catch-syscall.exp @@ -348,7 +348,9 @@ proc test_catch_syscall_execve {} { # Check for entry/return across the execve, making sure that the # syscall_state isn't lost when turning into a new process. insert_catch_syscall_with_arg "execve" - check_continue "execve" + + # Check that the execve is called. + check_call_to_syscall "execve" # Continue to main so extended-remote can read files as needed. # (Otherwise that "Reading" output confuses gdb_continue_to_end.) @@ -550,7 +552,7 @@ proc test_catch_syscall_multi_arch {} { set syscall2_name "write" set syscall_number 1 } elseif { [istarget "powerpc-*-linux*"] \ - || [istarget "powerpc64-*-linux*"] } { + || [istarget "powerpc64*-linux*"] } { set arch1 "powerpc:common" set arch2 "powerpc:common64" set syscall1_name "openat" -- 2.30.2