From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id 962ED3858401; Wed, 11 May 2022 11:30:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 962ED3858401 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom de Vries To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/testsuite] Fix gdb.base/catch-syscall.exp without --enable-targets X-Act-Checkin: binutils-gdb X-Git-Author: Tom de Vries X-Git-Refname: refs/heads/master X-Git-Oldrev: 4d88ae0c7b58ca3fc8125c0f573264de21647886 X-Git-Newrev: b00d6678f6ef55ef52d79bfd5424d775bba01f0e Message-Id: <20220511113038.962ED3858401@sourceware.org> Date: Wed, 11 May 2022 11:30:38 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 May 2022 11:30:38 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Db00d6678f6ef= 55ef52d79bfd5424d775bba01f0e commit b00d6678f6ef55ef52d79bfd5424d775bba01f0e Author: Tom de Vries Date: Wed May 11 13:30:33 2022 +0200 [gdb/testsuite] Fix gdb.base/catch-syscall.exp without --enable-targets =20 When doing a gdb build without --enable-targets, I run into: ... (gdb) UNSUPPORTED: gdb.base/catch-syscall.exp: multiple targets: \ s390:31-bit vs s390:64-bit: set architecture s390:64-bit delete breakpoints^M (gdb) info breakpoints^M No breakpoints or watchpoints.^M (gdb) break -qualified main^M No symbol table is loaded. Use the "file" command.^M Make breakpoint pending on future shared library load? (y or [n]) n^M (gdb) FAIL: gdb.base/catch-syscall.exp: gdb_breakpoint: set breakpoint = at main ... =20 The problem is that due to recent commit e21d8399303 ("[gdb/testsuite] = Remove target limits in gdb.base/catch-syscall.exp") "clean_restart $binfile" = no longer is called at the end of test_catch_syscall_multi_arch. =20 Fix this by moving "clean_restart $binfile" back to test_catch_syscall_multi_arch. =20 Tested on x86_64-linux. Diff: --- gdb/testsuite/gdb.base/catch-syscall.exp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/gdb.base/catch-syscall.exp b/gdb/testsuite/gdb.b= ase/catch-syscall.exp index fed0e7b774c..1260a64270f 100644 --- a/gdb/testsuite/gdb.base/catch-syscall.exp +++ b/gdb/testsuite/gdb.base/catch-syscall.exp @@ -568,7 +568,7 @@ proc test_catch_syscall_with_wrong_args_noxml {} { proc test_catch_syscall_multi_arch_1 { arch1 arch2 syscall1_name syscall2_name syscall_number } { - global decimal binfile + global decimal =20 with_test_prefix "multiple targets: $arch1 vs $arch2" { # We are not interested in loading any binary here, and in @@ -605,12 +605,12 @@ proc test_catch_syscall_multi_arch_1 { gdb_test "catch syscall $syscall_number" \ "Catchpoint $decimal \\(syscall .${syscall2_name}. \\\[${syscall_numb= er}\\\]\\)" \ "insert catch syscall on syscall $syscall_number -- $syscall2_name on= $arch2" - - clean_restart $binfile } } =20 proc test_catch_syscall_multi_arch {} { + global binfile + set arch1 "i386" set arch2 "i386:x86-64" set syscall1_name "exit" @@ -650,6 +650,8 @@ proc test_catch_syscall_multi_arch {} { set syscall_number 142 test_catch_syscall_multi_arch_1 $arch1 $arch2 $syscall1_name \ $syscall2_name $syscall_number + + clean_restart $binfile } =20 proc do_syscall_tests_without_xml {} {