From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id l9OkFp9PfGHUdgAAWB0awg (envelope-from ) for ; Fri, 29 Oct 2021 15:46:39 -0400 Received: by simark.ca (Postfix, from userid 112) id 481681F0BB; Fri, 29 Oct 2021 15:46:39 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 9DB3A1EE18 for ; Fri, 29 Oct 2021 15:46:38 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 07D373857801 for ; Fri, 29 Oct 2021 19:46:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 07D373857801 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1635536798; bh=wDvM5TYfAPd7t8ALLKIMQw8NOzr/N1/Drabw2N/jsMU=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Qyseqxy+fRjduPeCAySLkp0axrwnhsGzgSOUhgyxK6gKJ8eKvy6X9A4saj0SdGcOR ftnkLzx2iTz3sFgwulkBcGj3AMeQq7cO/u+d/IEIz6HGFFOOeZ6PFBs4KojjWrmvl8 c4fEqG+/lgDWdHyk693OaTHqJ0bZMUkwYZPSMHQ0= Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id B71813857819 for ; Fri, 29 Oct 2021 19:45:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B71813857819 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E2416218E0; Fri, 29 Oct 2021 19:45:19 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C39C913F7D; Fri, 29 Oct 2021 19:45:19 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id xFYALk9PfGHfJAAAMHmgww (envelope-from ); Fri, 29 Oct 2021 19:45:19 +0000 Date: Fri, 29 Oct 2021 21:45:18 +0200 To: gdb-patches@sourceware.org Subject: [PATCH][gdb/testsuite] Handle SIGILL in two gdb.arch powerpc test-cases Message-ID: <20211029194516.GA27121@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hi, On powerpc64le-linux, with test-case gdb.arch/powerpc-addpcis.exp I run into SIGILL: ... (gdb) PASS: gdb.arch/powerpc-addpcis.exp: get hexadecimal valueof "$r3" stepi^M ^M Program terminated with signal SIGILL, Illegal instruction.^M The program no longer exists.^M (gdb) PASS: gdb.arch/powerpc-addpcis.exp: set r4 ... because it's a power9 insn, and I'm running on a power8 machine. Fix this by handling the SIGILL. Likewise in gdb.arch/powerpc-lnia.exp. Tested on powerpc64le-linux. Any comments? Thanks, - Tom [gdb/testsuite] Handle SIGILL in two gdb.arch powerpc test-cases --- gdb/testsuite/gdb.arch/powerpc-addpcis.exp | 14 +++++++++++++- gdb/testsuite/gdb.arch/powerpc-lnia.exp | 14 +++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.arch/powerpc-addpcis.exp b/gdb/testsuite/gdb.arch/powerpc-addpcis.exp index d1bc7f49ce6..ff7052ce475 100644 --- a/gdb/testsuite/gdb.arch/powerpc-addpcis.exp +++ b/gdb/testsuite/gdb.arch/powerpc-addpcis.exp @@ -50,7 +50,19 @@ gdb_breakpoint $bp1 gdb_breakpoint $bp2 gdb_breakpoint $bp3 -gdb_test "stepi" "" "set r3 " +set insn_supported 1 +gdb_test_multiple "stepi" "set r3" { + -re "Program received signal SIGILL, Illegal instruction\\..*" { + set insn_supported 0 + } + -re -wrap "" { + pass $gdb_test_name + } +} +if { ! $insn_supported } { + unsupported "illegal instruction" + return +} set check_r3 [get_hexadecimal_valueof "\$r3" "default0"] gdb_test "stepi" "" "set r4" set check_r4 [get_hexadecimal_valueof "\$r4" "default0"] diff --git a/gdb/testsuite/gdb.arch/powerpc-lnia.exp b/gdb/testsuite/gdb.arch/powerpc-lnia.exp index 0f56d834046..4ab4f8d92be 100644 --- a/gdb/testsuite/gdb.arch/powerpc-lnia.exp +++ b/gdb/testsuite/gdb.arch/powerpc-lnia.exp @@ -54,7 +54,19 @@ gdb_breakpoint $bp3 # single-step through the lnia instructions, and retrieve the # register values as we proceed. -gdb_test "stepi" "" "set r3" +set insn_supported 1 +gdb_test_multiple "stepi" "set r3" { + -re "Program received signal SIGILL, Illegal instruction\\..*" { + set insn_supported 0 + } + -re -wrap "" { + pass $gdb_test_name + } +} +if { ! $insn_supported } { + unsupported "illegal instruction" + return +} set check_r3 [get_hexadecimal_valueof "\$r3" "default0"] gdb_test "stepi" "" "set r4" set check_r4 [get_hexadecimal_valueof "\$r4" "default0"]