From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id IG+/Cl03z19hYgAAWB0awg (envelope-from ) for ; Tue, 08 Dec 2020 03:20:45 -0500 Received: by simark.ca (Postfix, from userid 112) id 1E2291F096; Tue, 8 Dec 2020 03:20:45 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=MAILING_LIST_MULTI,RDNS_NONE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [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 8C2381E590 for ; Tue, 8 Dec 2020 03:20:44 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7E81E385800B; Tue, 8 Dec 2020 08:20:43 +0000 (GMT) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id EFF46385800B for ; Tue, 8 Dec 2020 08:20:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org EFF46385800B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tdevries@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 0D920AF2B; Tue, 8 Dec 2020 08:20:39 +0000 (UTC) To: Pedro Alves , gdb-patches@sourceware.org References: <20201204123832.GA4805@delia> <894bd35b-62ff-9fbe-51eb-f84d394156a1@palves.net> From: Tom de Vries Subject: Re: [committed][gdb/testsuite] Make gdb.arch/amd64-gs_base.exp unsupported for i386 Message-ID: Date: Tue, 8 Dec 2020 09:20:37 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <894bd35b-62ff-9fbe-51eb-f84d394156a1@palves.net> Content-Type: multipart/mixed; boundary="------------25E9E1E269A9E048D7CA8B4E" Content-Language: en-US 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: , Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" This is a multi-part message in MIME format. --------------25E9E1E269A9E048D7CA8B4E Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit On 12/4/20 7:57 PM, Pedro Alves wrote: > On 12/4/20 12:38 PM, Tom de Vries wrote: >> Hi, >> >> With target board unix/-m32 I run into: >> ... >> (gdb) print /x $fs_base^M >> $1 = void^M >> (gdb) FAIL: gdb.arch/amd64-gs_base.exp: print fs_base >> ... >> >> The problem is that the fs_base register is not supported for i386. >> >> Fix this by making the test unsupported if fs_base/gs_base don't show up in >> info register sys output. > > > Why not check is_amd64_regs_target instead? > Agreed, that's simpler. Fixed in attached patch, will commit shortly. Thanks, - Tom --------------25E9E1E269A9E048D7CA8B4E Content-Type: text/x-patch; charset=UTF-8; name="0011-gdb-testsuite-Simplify-gdb.arch-amd64-gs_base.exp.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename*0="0011-gdb-testsuite-Simplify-gdb.arch-amd64-gs_base.exp.patch" [gdb/testsuite] Simplify gdb.arch/amd64-gs_base.exp Redo fix committed in commit 67748e0f66 "[gdb/testsuite] Make gdb.arch/amd64-gs_base.exp unsupported for i386" using is_amd64_regs_targ= et. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2020-12-08 Tom de Vries * gdb.arch/amd64-gs_base.exp: Undo commit 67748e0f66, reimplement using is_amd64_regs_target. --- gdb/testsuite/gdb.arch/amd64-gs_base.exp | 28 ++------------------------= -- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/gdb/testsuite/gdb.arch/amd64-gs_base.exp b/gdb/testsuite/gdb= =2Earch/amd64-gs_base.exp index d29043bb79..a5cf98d2cc 100644 --- a/gdb/testsuite/gdb.arch/amd64-gs_base.exp +++ b/gdb/testsuite/gdb.arch/amd64-gs_base.exp @@ -15,7 +15,7 @@ =20 standard_testfile =20 -if { ![istarget "x86_64-*linux*"] } then { +if { ![is_amd64_regs_target] } then { verbose "Untested x86_64 fs_base and gs_base tests." return } @@ -30,31 +30,6 @@ if ![runto_main] { return -1 } =20 -# Test the presence of fs_base and gs_base on the system -# register group and values. -# -set ws "\[\t \]+" -set info_reg_out [multi_line "info register sys" \ - "fs_base${ws}$hex${ws}$decimal"\ - "gs_base${ws}$hex${ws}$decimal"\ - "orig_rax${ws}$hex${ws}\[-\]$decimal" ] -set info_reg_out_m32 [multi_line "info register sys" \ - "orig_eax${ws}$hex${ws}\[-\]$decimal" ] - -set supported 0 -gdb_test_multiple "info register sys" "" { - -re -wrap $info_reg_out { - set supported 1 - } - -re -wrap $info_reg_out_m32 { - } -} - -if { ! $supported } { - unsupported "target does not support fs_base and gs_base" - return -1 -} - gdb_test "print /x \$fs_base" "=3D $hex" "print fs_base" gdb_test "print /x \$gs_base" "=3D $hex" "print gs_base" =20 @@ -64,6 +39,7 @@ gdb_test "print \$gs_base =3D 3" "=3D 3" "set gs_base" # Test the presence of fs_base and gs_base on the system # register group and values. # +set ws "\[\t \]+" set info_reg_out [multi_line "info register sys" \ "fs_base${ws}0x2${ws}2"\ "gs_base${ws}0x3${ws}3"\ --------------25E9E1E269A9E048D7CA8B4E--